Skip to content

Commit b974c07

Browse files
committed
Use typescript/native-preview
1 parent 26d34bd commit b974c07

File tree

4 files changed

+93
-23
lines changed

4 files changed

+93
-23
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@
4545
},
4646
"scripts": {
4747
"build": "pnpm run clean:dist && run-p -c --aggregate-output build:* && run-p -c --aggregate-output build:clean:*",
48-
"build:cjs": "dotenvx -q run -f .env.local -- tsc",
49-
"build:esm": "dotenvx -q run -f .env.local -- tsc -p tsconfig.esm.json",
48+
"build:cjs": "dotenvx -q run -f .env.local -- tsgo",
49+
"build:esm": "dotenvx -q run -f .env.local -- tsgo -p tsconfig.esm.json",
5050
"build:clean:cjs": "dotenvx -q run -f .env.local -- node scripts/rename-dist-cjs-files.mjs",
5151
"build:clean:esm": "dotenvx -q run -f .env.local -- node scripts/rename-dist-esm-files.mjs",
5252
"check": "run-p -c --aggregate-output check:*",
5353
"check:lint": "dotenvx -q run -f .env.local -- eslint --report-unused-disable-directives .",
5454
"check:lint:fix": "pnpm run check:lint -- --fix",
55-
"check:tsc": "dotenvx -q run -f .env.local -- tsc",
55+
"check:tsc": "dotenvx -q run -f .env.local -- tsgo",
5656
"check-ci": "pnpm check:lint",
5757
"coverage": "run-s coverage:*",
5858
"coverage:test": "run-s test:prepare test:unit:coverage",
@@ -121,7 +121,7 @@
121121
"oxlint": "1.15.0",
122122
"taze": "19.6.0",
123123
"type-coverage": "2.29.7",
124-
"typescript": "5.9.2",
124+
"@typescript/native-preview": "7.0.0-dev.20250912.1",
125125
"typescript-eslint": "8.43.0",
126126
"vitest": "3.2.4"
127127
},

pnpm-lock.yaml

Lines changed: 73 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.base.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
{
22
"compilerOptions": {
3+
// The following options are not supported by @typescript/native-preview.
4+
// They are either ignored or throw an unknown option error:
5+
//"importsNotUsedAsValues": "remove",
6+
//"incremental": true,
37
"allowImportingTsExtensions": false,
48
"allowJs": false,
59
"composite": true,
610
"declaration": true,
711
"declarationMap": true,
812
"erasableSyntaxOnly": true,
913
"esModuleInterop": true,
14+
"exactOptionalPropertyTypes": true,
1015
"forceConsistentCasingInFileNames": true,
11-
"incremental": true,
1216
"isolatedModules": true,
1317
"lib": ["esnext"],
1418
"noEmitOnError": true,
19+
"noFallthroughCasesInSwitch": true,
20+
"noImplicitOverride": true,
21+
"noPropertyAccessFromIndexSignature": true,
22+
"noUncheckedIndexedAccess": true,
23+
"noUncheckedSideEffectImports": true,
24+
"noUnusedLocals": true,
25+
"noUnusedParameters": true,
1526
"resolveJsonModule": true,
16-
"rootDir": "src",
27+
"rewriteRelativeImportExtensions": true,
1728
"skipLibCheck": true,
1829
"sourceMap": true,
1930
"strict": true,
2031
"strictNullChecks": true,
2132
"target": "esnext",
2233
"useUnknownInCatchVariables": true,
23-
24-
/* New checks being tried out */
25-
"exactOptionalPropertyTypes": true,
26-
"noFallthroughCasesInSwitch": true,
27-
"noImplicitOverride": true,
28-
"noPropertyAccessFromIndexSignature": true,
29-
"noUncheckedIndexedAccess": true,
30-
31-
/* Additional checks */
32-
"importsNotUsedAsValues": "remove",
33-
"noUnusedLocals": true,
34-
"noUnusedParameters": true,
35-
"noUncheckedSideEffectImports": true
34+
"verbatimModuleSyntax": true
3635
}
3736
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"module": "commonjs",
55
"moduleResolution": "node",
66
"outDir": "dist/cjs",
7-
"rootDir": "src"
7+
"rootDir": "src",
8+
"verbatimModuleSyntax": false
89
},
910
"include": ["src/*.ts"]
1011
}

0 commit comments

Comments
 (0)