-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type errors when using TypeScript v3.5.1 #946
Comments
Hmm, why is your typescript building glimmer-vm? |
My app is built using TypeScript (ember-cli-typescript). Here is my tsconfig.json for context. Note that {
"compilerOptions": {
"target": "ES2017",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"alwaysStrict": true,
"baseUrl": ".",
"experimentalDecorators": true,
"inlineSourceMap": true,
"inlineSources": true,
"module": "ESNext",
"moduleResolution": "node",
"noEmit": true,
"noEmitOnError": false,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"lib": ["es5", "es6", "es7", "dom", "esnext.asynciterable"],
"paths": {
"demand-web/tests/*": [
"tests/*"
],
"demand-web/*": [
"app/*"
],
"*": [
"types/*"
],
"fetch": [
"node_modules/ember-fetch"
],
"@glimmer/component": [
"node_modules/@glimmer/component/dist/types/addon/-private/component.d.ts"
]
},
"types": [
"ember",
"ember-qunit",
"ember-test-helpers",
"ember-testing-helpers",
"ember__test-helpers",
"qunit",
"rsvp"
]
},
"include": [
"app/**/*",
"tests/**/*",
"types/**/*"
]
} |
Just tried TypeScript v3.6.2 and still seeing these issues above. |
@chancancode TypeScript's default behavior is to validate the typings included in any libraries you import as well—after all, it needs that information to know whether your own project's code is correct. Downstream consumers can squash the error messages by setting @rwjblue I don't want to put words in your mouth, but my understanding is that this kind of breaking change in the TS compiler across minor releases is (super reasonably) a big part of your hesitation around shipping types with core packages? |
Exactly. |
Updating the compiler version resolves some major performance problems triggered by the Glimmer type definitions. Unfortunately, it also causes some noise due to [glimmerjs/glimmer-vm#946], but that should be fixed in an upcoming release of the `@glimmer/*` packages, and it does not cause internal issues for this package. [glimmerjs/glimmer-vm#946]: glimmerjs/glimmer-vm#946
Updating the compiler version resolves some major performance problems triggered by the Glimmer type definitions. Unfortunately, it also causes some noise due to [glimmerjs/glimmer-vm#946], but that should be fixed in an upcoming release of the `@glimmer/*` packages, and it does not cause internal issues for this package. [glimmerjs/glimmer-vm#946]: glimmerjs/glimmer-vm#946 Also update the tsconfig to target current versions of JavaScript in build and in lib to use.
Closing as solved by #1053. |
@locks Are we sure this is solved? I'm running into this exact same issue when attempting to use Edit: I tried every minor versions of typescript between (and including) v3.5 and v4.1, and could not find one where imports from |
@Herriau is it possible you have copies of multiple different versions of |
@dfreeman Indeed that must be the reason for this. I tried in a vanilla package (i.e. as opposed to my EmberCLI-generated add-on package) and I am not getting the same TS errors. I should be able to pin the version of |
I started having the following TypeScript type errors when upgraded to v3.5.1.
Note: This is an Octane app (Ember + Glimmer components).
The text was updated successfully, but these errors were encountered: