Skip to content

Commit

Permalink
Change moduleResolution to NodeNext, and add ts-expect-error in faili…
Browse files Browse the repository at this point in the history
…ng cases, see #1459
  • Loading branch information
samreid committed Sep 17, 2024
1 parent ce419be commit 572fdaa
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/grunt/tasks/build-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
import * as grunt from 'grunt';
import getRepo from './util/getRepo';
// @ts-expect-error
import jimp from 'jimp';

const generateThumbnails = require( '../generateThumbnails' );
Expand Down
2 changes: 2 additions & 0 deletions js/grunt/tasks/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*/

const buildStandalone = require( '../buildStandalone' );

// @ts-expect-error
import assert from 'assert';
import * as grunt from 'grunt';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
Expand Down
2 changes: 2 additions & 0 deletions js/grunt/tasks/commits-since.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import getRepo from './util/getRepo';

const commitsSince = require( '../commitsSince' );

// @ts-expect-error
import assert from 'assert';
import getOption from './util/getOption';

Expand Down
1 change: 1 addition & 0 deletions js/grunt/tasks/lint-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @author Sam Reid (PhET Interactive Simulations)
*/

// @ts-expect-error
import assert from 'assert';
import * as grunt from 'grunt';
import buildLocal from './util/buildLocal';
Expand Down
1 change: 1 addition & 0 deletions js/grunt/tasks/util/getBrands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/**
* @author Sam Reid (PhET Interactive Simulations)
*/
// @ts-expect-error
import assert from 'assert';
import IntentionalAny from '../../../../../phet-core/js/types/IntentionalAny.js';
import getOption from './getOption';
Expand Down
1 change: 1 addition & 0 deletions js/grunt/tasks/util/getOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// Use nopt to guarantee compatibility with grunt. See usage site: https://github.com/phetsims/chipper/issues/1459
// See usage in chipper/node_modules/grunt-cli/bin/grunt
// @ts-expect-error
import nopt from 'nopt';
import IntentionalAny from '../../../../../phet-core/js/types/IntentionalAny.js';

Expand Down
1 change: 1 addition & 0 deletions js/grunt/tasks/util/getRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
import * as grunt from 'grunt';

// @ts-expect-error
import assert from 'assert';
import getOption from './getOption';

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"compilerOptions": {
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "node"
"moduleResolution": "NodeNext"
}
}

0 comments on commit 572fdaa

Please sign in to comment.