Skip to content

Commit 31861ad

Browse files
authored
chore: replace tsc with tsgo (#9409)
* replace tsc with tsgo * stricter types fixes * patch @types/jsdom * fix patch
1 parent d7dca0c commit 31861ad

File tree

5 files changed

+102
-3
lines changed

5 files changed

+102
-3
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
},
1010
"packageManager": "yarn@4.2.2",
1111
"scripts": {
12-
"check-types": "tsc",
12+
"tsgo": "tsgo",
13+
"check-types": "tsgo --noEmit",
14+
"check-types:tsc": "tsc",
1315
"clean": "make clean",
1416
"clean:all": "make clean_all",
1517
"install-16": "node scripts/react-16-install-prep.mjs && yarn add react@^16.8.0 react-dom@^16.8.0 @testing-library/react@^12 @testing-library/react-hooks@^8 @testing-library/dom@^8 react-test-renderer@^16.9.0 && node scripts/oldReactSupport.mjs",
@@ -134,6 +136,7 @@
134136
"@testing-library/user-event": "patch:@testing-library/user-event@npm%3A14.6.1#~/.yarn/patches/@testing-library-user-event-npm-14.6.1-5da7e1d4e2.patch",
135137
"@types/react": "^19.0.0",
136138
"@types/react-dom": "^19.0.0",
139+
"@typescript/native-preview": "^7.0.0-dev.20251223.1",
137140
"@yarnpkg/types": "^4.0.0",
138141
"autoprefixer": "^9.6.0",
139142
"axe-playwright": "^1.1.11",

packages/@react-spectrum/utils/src/Slots.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function useSlotProps<T>(props: T & {id?: string}, defaultSlot?: string):
2424
// @ts-ignore TODO why is slot an object and not just string or undefined?
2525
let {[slot]: slotProps = {}} = useContext(SlotContext) || {};
2626

27-
return mergeProps(props, mergeProps(slotProps, {id: props.id}));
27+
return mergeProps(props, mergeProps(slotProps, {id: props.id})) as T;
2828
}
2929

3030
export function cssModuleToSlots(cssModule: {[cssmodule: string]: string}): {[slot: string]: {UNSAFE_className: string}} {

packages/dev/s2-docs/src/zip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ export function zip(files: {[name: string]: string}): Blob {
8585
putUint32s(eocd, 12, cdSz, offset);
8686
records.push(eocd);
8787

88-
return new Blob(records, {type: 'application/zip'});
88+
return new Blob(records as BlobPart[], {type: 'application/zip'});
8989
}

patches/@types+jsdom+20.0.1.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/node_modules/@types/jsdom/base.d.ts b/node_modules/@types/jsdom/base.d.ts
2+
index 67d7514..144a595 100755
3+
--- a/node_modules/@types/jsdom/base.d.ts
4+
+++ b/node_modules/@types/jsdom/base.d.ts
5+
@@ -191,7 +191,9 @@ declare module "jsdom" {
6+
7+
/* ECMAScript Globals */
8+
globalThis: DOMWindow;
9+
+ // @ts-ignore - conflicts with Window's numeric index signature
10+
readonly ["Infinity"]: number;
11+
+ // @ts-ignore - conflicts with Window's numeric index signature
12+
readonly ["NaN"]: number;
13+
readonly undefined: undefined;
14+

yarn.lock

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10882,6 +10882,87 @@ __metadata:
1088210882
languageName: node
1088310883
linkType: hard
1088410884

10885+
"@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20251223.1":
10886+
version: 7.0.0-dev.20251223.1
10887+
resolution: "@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20251223.1"
10888+
conditions: os=darwin & cpu=arm64
10889+
languageName: node
10890+
linkType: hard
10891+
10892+
"@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20251223.1":
10893+
version: 7.0.0-dev.20251223.1
10894+
resolution: "@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20251223.1"
10895+
conditions: os=darwin & cpu=x64
10896+
languageName: node
10897+
linkType: hard
10898+
10899+
"@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20251223.1":
10900+
version: 7.0.0-dev.20251223.1
10901+
resolution: "@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20251223.1"
10902+
conditions: os=linux & cpu=arm64
10903+
languageName: node
10904+
linkType: hard
10905+
10906+
"@typescript/native-preview-linux-arm@npm:7.0.0-dev.20251223.1":
10907+
version: 7.0.0-dev.20251223.1
10908+
resolution: "@typescript/native-preview-linux-arm@npm:7.0.0-dev.20251223.1"
10909+
conditions: os=linux & cpu=arm
10910+
languageName: node
10911+
linkType: hard
10912+
10913+
"@typescript/native-preview-linux-x64@npm:7.0.0-dev.20251223.1":
10914+
version: 7.0.0-dev.20251223.1
10915+
resolution: "@typescript/native-preview-linux-x64@npm:7.0.0-dev.20251223.1"
10916+
conditions: os=linux & cpu=x64
10917+
languageName: node
10918+
linkType: hard
10919+
10920+
"@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20251223.1":
10921+
version: 7.0.0-dev.20251223.1
10922+
resolution: "@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20251223.1"
10923+
conditions: os=win32 & cpu=arm64
10924+
languageName: node
10925+
linkType: hard
10926+
10927+
"@typescript/native-preview-win32-x64@npm:7.0.0-dev.20251223.1":
10928+
version: 7.0.0-dev.20251223.1
10929+
resolution: "@typescript/native-preview-win32-x64@npm:7.0.0-dev.20251223.1"
10930+
conditions: os=win32 & cpu=x64
10931+
languageName: node
10932+
linkType: hard
10933+
10934+
"@typescript/native-preview@npm:^7.0.0-dev.20251223.1":
10935+
version: 7.0.0-dev.20251223.1
10936+
resolution: "@typescript/native-preview@npm:7.0.0-dev.20251223.1"
10937+
dependencies:
10938+
"@typescript/native-preview-darwin-arm64": "npm:7.0.0-dev.20251223.1"
10939+
"@typescript/native-preview-darwin-x64": "npm:7.0.0-dev.20251223.1"
10940+
"@typescript/native-preview-linux-arm": "npm:7.0.0-dev.20251223.1"
10941+
"@typescript/native-preview-linux-arm64": "npm:7.0.0-dev.20251223.1"
10942+
"@typescript/native-preview-linux-x64": "npm:7.0.0-dev.20251223.1"
10943+
"@typescript/native-preview-win32-arm64": "npm:7.0.0-dev.20251223.1"
10944+
"@typescript/native-preview-win32-x64": "npm:7.0.0-dev.20251223.1"
10945+
dependenciesMeta:
10946+
"@typescript/native-preview-darwin-arm64":
10947+
optional: true
10948+
"@typescript/native-preview-darwin-x64":
10949+
optional: true
10950+
"@typescript/native-preview-linux-arm":
10951+
optional: true
10952+
"@typescript/native-preview-linux-arm64":
10953+
optional: true
10954+
"@typescript/native-preview-linux-x64":
10955+
optional: true
10956+
"@typescript/native-preview-win32-arm64":
10957+
optional: true
10958+
"@typescript/native-preview-win32-x64":
10959+
optional: true
10960+
bin:
10961+
tsgo: bin/tsgo.js
10962+
checksum: 10c0/e7ce674c99fb045d72318e5a9d6d16a0f60e11e7315105197a5115f433ac86ee6a583899f0e54c8022fd799f58dc546fa1d0cd730dd6fe3de1f22751fe281bb1
10963+
languageName: node
10964+
linkType: hard
10965+
1088510966
"@verdaccio/auth@npm:8.0.0-next-8.7":
1088610967
version: 8.0.0-next-8.7
1088710968
resolution: "@verdaccio/auth@npm:8.0.0-next-8.7"
@@ -24759,6 +24840,7 @@ __metadata:
2475924840
"@testing-library/user-event": "patch:@testing-library/user-event@npm%3A14.6.1#~/.yarn/patches/@testing-library-user-event-npm-14.6.1-5da7e1d4e2.patch"
2476024841
"@types/react": "npm:^19.0.0"
2476124842
"@types/react-dom": "npm:^19.0.0"
24843+
"@typescript/native-preview": "npm:^7.0.0-dev.20251223.1"
2476224844
"@yarnpkg/types": "npm:^4.0.0"
2476324845
autoprefixer: "npm:^9.6.0"
2476424846
axe-playwright: "npm:^1.1.11"

0 commit comments

Comments
 (0)