diff --git a/bin/build.mjs b/bin/build.mjs index b97441f0013858..9445e65b551b6a 100755 --- a/bin/build.mjs +++ b/bin/build.mjs @@ -114,7 +114,7 @@ async function build() { // Step 4: Build TypeScript types console.log( '\nšŸ“˜ Building TypeScript types...\n' ); const tsStartTime = Date.now(); - await exec( 'tsc', [ '--build' ] ).catch( () => { + await exec( 'tsgo', [ '--build' ] ).catch( () => { console.error( '\nāŒ TypeScript compilation failed. Try cleaning up first: `npm run clean:package-types`' ); diff --git a/bin/dev.mjs b/bin/dev.mjs index e5679f17790c0b..91fd4d5b4875e7 100755 --- a/bin/dev.mjs +++ b/bin/dev.mjs @@ -150,7 +150,7 @@ async function dev() { // Step 4: Build TypeScript types console.log( '\nšŸ“˜ Building TypeScript types...\n' ); const tsStartTime = Date.now(); - await exec( 'tsc', [ '--build' ] ).catch( () => { + await exec( 'tsgo', [ '--build' ] ).catch( () => { console.error( '\nāŒ TypeScript compilation failed. Try cleaning up first: `npm run clean:package-types`' ); @@ -182,7 +182,7 @@ async function dev() { console.log( ' - Package builder watching for source changes\n' ); // Start TypeScript watch - const tscWatch = execAsync( 'tsc', [ + const tscWatch = execAsync( 'tsgo', [ '--build', '--watch', '--preserveWatchOutput', diff --git a/bin/packages/check-build-type-declaration-files.js b/bin/packages/check-build-type-declaration-files.js index 1696313c33f34e..49c7665dbb61f7 100644 --- a/bin/packages/check-build-type-declaration-files.js +++ b/bin/packages/check-build-type-declaration-files.js @@ -70,7 +70,7 @@ async function getDecFile( packagePath ) { async function typecheckDeclarations( file ) { return new Promise( ( resolve, reject ) => { exec( - `npx tsc --ignoreConfig --target esnext --moduleResolution bundler --noEmit --skipLibCheck "${ file }"`, + `npx tsgo --ignoreConfig --target esnext --moduleResolution bundler --noEmit --skipLibCheck "${ file }"`, ( error, stdout, stderr ) => { if ( error ) { reject( { file, error, stderr, stdout } ); diff --git a/package.json b/package.json index e2143fbc38bfac..90d67a61c4fbd0 100644 --- a/package.json +++ b/package.json @@ -117,9 +117,9 @@ }, "scripts": { "build": "node ./bin/build.mjs", - "build:profile-types": "rimraf ./ts-traces && npm run clean:package-types && node ./bin/packages/validate-typescript-version.js && ( tsc --build --extendedDiagnostics --generateTrace ./ts-traces || ( echo 'tsc failed.'; exit 1 ) ) && node ./bin/packages/check-build-type-declaration-files.js && npx --yes @typescript/analyze-trace ts-traces > ts-traces/analysis.txt && node -p \"'\\n\\nDone! Build traces saved to ts-traces/ directory.\\nTrace analysis saved to ts-traces/analysis.txt.'\"", + "build:profile-types": "rimraf ./ts-traces && npm run clean:package-types && node ./bin/packages/validate-typescript-version.js && ( tsgo --build --extendedDiagnostics --generateTrace ./ts-traces || ( echo 'tsc failed.'; exit 1 ) ) && node ./bin/packages/check-build-type-declaration-files.js && npx --yes @typescript/analyze-trace ts-traces > ts-traces/analysis.txt && node -p \"'\\n\\nDone! Build traces saved to ts-traces/ directory.\\nTrace analysis saved to ts-traces/analysis.txt.'\"", "build:plugin-zip": "bash ./bin/build-plugin-zip.sh", - "clean:package-types": "tsc --build --clean && rimraf --glob \"./packages/*/build-types\"", + "clean:package-types": "tsgo --build --clean && rimraf --glob \"./packages/*/build-types\"", "clean:packages": "rimraf --glob \"./packages/*/{build,build-module,build-wp,build-style}\" \"./build\"", "component-usage-stats": "node ./node_modules/react-scanner/bin/react-scanner -c ./react-scanner.config.js", "dev": "node ./bin/dev.mjs", diff --git a/packages/preferences/src/components/preferences-modal-tabs/index.tsx b/packages/preferences/src/components/preferences-modal-tabs/index.tsx index abdb042967cf65..2fc90be6537aab 100644 --- a/packages/preferences/src/components/preferences-modal-tabs/index.tsx +++ b/packages/preferences/src/components/preferences-modal-tabs/index.tsx @@ -110,10 +110,10 @@ export default function PreferencesModalTabs( { { tabs.map( ( tab ) => { return ( - // @ts-expect-error: Navigator.Button is currently typed in a way that prevents Item from being passed in