TheDonutProject
TheDonutProject copied to clipboard
Add Typescript Donut
Description
Typescript -> Just run with Nodejs
Checklist
- [x] I have read and followed the instructions in the README
- [x] I read and followed the basic rules and recommendations
- [x] I have put the language I am adding in the name of this PR
- [x] I have created a file named
donutin thedonutsfolder with the proper file extension - [x] I have added a new key/value pair to
info.jsonwith the proper metadata (Includingdescriptionfor Alternate-Implementation Donuts)
and i added , add someones entry in json file, because someone forgot it and this would lead to an error ;)
It works (I've tested), and type-checks! even with this tsconfig.json:
{
"compilerOptions": {
"target": "es2024",
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"strictBuiltinIteratorReturn": true,
"noImplicitThis": true,
"useUnknownInCatchVariables": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false
}
}
tsc version 5.8.3
However, for some reason, const b and const z are inferred as any[] by the LSP, but noImplicitAny isn't catching that (this? microsoft/TypeScript#43798)
IMO, to make the TS alt different-enough to the JS implementation, there must be some explicit type anotations