Skip to content
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

verbatimModuleSyntax causes type errors in dependencies #228

Closed
simonihmig opened this issue Nov 8, 2023 · 2 comments
Closed

verbatimModuleSyntax causes type errors in dependencies #228

simonihmig opened this issue Nov 8, 2023 · 2 comments

Comments

@simonihmig
Copy link
Collaborator

Using the latest version of the blueprint failed for me when using the verbatimModuleSyntax option introduced in #214, with type errors from node_modules:

[types] ../../../../node_modules/@ember/test-helpers/public-types/@ember/test-helpers/dom/-target.d.ts:2:16 - error TS1284: An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but 'Target' only refers to a type.
[types] 
[types] 2 export default Target;
[types]                  ~~~~~~
[types] 
[types] ../../../../node_modules/@types/ember__polyfills/types.d.ts:4:16 - error TS1284: An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but 'Mix' only refers to a type.
[types] 
[types] 4 export default Mix;
[types]                  ~~~
[types] 

Seems to me we shouldn't use this, but have a lint rule only? /cc @NullVoxPopuli

@simonihmig simonihmig added the bug Something isn't working label Nov 8, 2023
@NullVoxPopuli
Copy link
Collaborator

NullVoxPopuli commented Nov 8, 2023

option introduced in #214

It's now also in @tsconfig/ember

me we shouldn't use this

I consider this a bug in the libraries, because you could accidentally ship side-effecting imports from libraries until they fix their TS.

As a work around. Skiplibcheck is an option, but we should fix upsteam as the motivation for verbatim module syntax is beyond just v2 addons

Odds are, forgetting type was a mistake, as a lot of people are already using type imports, but without enforcement, it's easy to miss

@NullVoxPopuli NullVoxPopuli added problem-lies-elsewhere and removed bug Something isn't working labels Nov 23, 2023
@NullVoxPopuli
Copy link
Collaborator

Gonna close this, as the problem lies elsewhere, in other libraries in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants