Enable maximum-strict TypeScript across our packages
tsconfig.base.json adds noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, noFallthroughCasesInSwitch, noUnusedLocals, and noUnusedParameters on top of strict. Vendored packages opt out of the new flags locally (their tsconfigs are ours to regenerate; their source is not), keeping upstream-sync friendliness. Our code fixed accordingly: index accesses acknowledge undefined (assembler flush cursors, lastTurnNumber); optional properties are omitted instead of set-to-undefined (GenerateResult.usage, ToolDefinition.strict, GenerateOptions.system/tools, error payloads via an errorData helper); Session.onAppend is explicitly `(…) => void | undefined`; tests and examples updated for unused parameters and indexed access.
This commit is contained in:
Vendored
+12
-3
@@ -5,10 +5,19 @@
|
||||
"outDir": "lib",
|
||||
"noImplicitAny": false,
|
||||
"noImplicitThis": false,
|
||||
"strictFunctionTypes": false
|
||||
"strictFunctionTypes": false,
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cosmokit" }
|
||||
{
|
||||
"path": "../cosmokit"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+9
-2
@@ -2,7 +2,14 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
"outDir": "lib",
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"]
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+15
-4
@@ -2,11 +2,22 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
"outDir": "lib",
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cordis" },
|
||||
{ "path": "../loader" }
|
||||
{
|
||||
"path": "../cordis"
|
||||
},
|
||||
{
|
||||
"path": "../loader"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+27
-8
@@ -2,15 +2,34 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
"outDir": "lib",
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cosmokit" },
|
||||
{ "path": "../cordis" },
|
||||
{ "path": "../loader" },
|
||||
{ "path": "../include" },
|
||||
{ "path": "../timer" },
|
||||
{ "path": "../schemastery" }
|
||||
{
|
||||
"path": "../cosmokit"
|
||||
},
|
||||
{
|
||||
"path": "../cordis"
|
||||
},
|
||||
{
|
||||
"path": "../loader"
|
||||
},
|
||||
{
|
||||
"path": "../include"
|
||||
},
|
||||
{
|
||||
"path": "../timer"
|
||||
},
|
||||
{
|
||||
"path": "../schemastery"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+18
-5
@@ -3,12 +3,25 @@
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib",
|
||||
"noImplicitAny": false
|
||||
"noImplicitAny": false,
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cosmokit" },
|
||||
{ "path": "../cordis" },
|
||||
{ "path": "../loader" }
|
||||
{
|
||||
"path": "../cosmokit"
|
||||
},
|
||||
{
|
||||
"path": "../cordis"
|
||||
},
|
||||
{
|
||||
"path": "../loader"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+15
-4
@@ -3,11 +3,22 @@
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib",
|
||||
"noImplicitAny": false
|
||||
"noImplicitAny": false,
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cosmokit" },
|
||||
{ "path": "../cordis" }
|
||||
{
|
||||
"path": "../cosmokit"
|
||||
},
|
||||
{
|
||||
"path": "../cordis"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+18
-5
@@ -2,12 +2,25 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
"outDir": "lib",
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cosmokit" },
|
||||
{ "path": "../cordis" },
|
||||
{ "path": "../schemastery" }
|
||||
{
|
||||
"path": "../cosmokit"
|
||||
},
|
||||
{
|
||||
"path": "../cordis"
|
||||
},
|
||||
{
|
||||
"path": "../schemastery"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+12
-3
@@ -3,10 +3,19 @@
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib",
|
||||
"module": "preserve"
|
||||
"module": "preserve",
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cosmokit" }
|
||||
{
|
||||
"path": "../cosmokit"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+15
-4
@@ -2,11 +2,22 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
"outDir": "lib",
|
||||
"noUncheckedIndexedAccess": false,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"noImplicitOverride": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../cosmokit" },
|
||||
{ "path": "../cordis" }
|
||||
{
|
||||
"path": "../cosmokit"
|
||||
},
|
||||
{
|
||||
"path": "../cordis"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user