JS-DevTools / ono

Wrap errors without losing the original message, stack trace, or properties
https://jstools.dev/ono/
MIT License
106 stars 11 forks source link

TypeScript linter fails with TS1169 #13

Closed KirillGordineRhenag closed 4 years ago

KirillGordineRhenag commented 4 years ago

I installed the recent version of ono (7.1.2) using npm and received the following error ERROR in ../node_modules/@jsdevtools/ono/esm/types.d.ts:135:5 - error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type. during linting the project.

JamesMessinger commented 4 years ago

What version of TypeScript are you using? And what compiler options are you using?

JamesMessinger commented 4 years ago

The current version of Ono is built using TypeScript 3.9.6, with the following compiler options:

https://github.com/JS-DevTools/ono/blob/3b1bd865f64f2cb96af8e940bb4fb42c46c681c4/tsconfig.json#L2-L23

KirillGordineRhenag commented 4 years ago

I'm still using TSC 3.5.3; this might be the problem. I will try again after the upgrade to Angular 10 (and the recent version of TS) again. If this fail again I will open a new issues, ok?

for the sake of completeness - my `tsconfig.json` ```JSON { "compileOnSave": false, "compilerOptions": { "allowSyntheticDefaultImports": true, "esModuleInterop": true, "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "downlevelIteration": true, "experimentalDecorators": true, "module": "esnext", "moduleResolution": "node", "importHelpers": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2018", "dom" ], "paths": { "@app/*": [ "src/app/*" ], "@env/*": [ "src/environments/*" ] } }, "angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictInjectionParameters": true } } ```
JamesMessinger commented 4 years ago

Sounds good 👍 I'll close this ticket, so you can open a new one if the issue persists after upgrading