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

Add typesVersions for resolving all type imports using legacy moduleResolution #636

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

simonihmig
Copy link
Contributor

When TS is set up to not use a moduleResolution of node16 or bundler yet (like legacy node/node10), then TS would not look into exports.

There is types, but that only works when resolving the main index module, like import from 'ember-cli-page-object', but all other submodules like ember-cli-page-object/adapter would fail to resolve to types.d.ts.

This is removing types in favor of typesVersions, supporting the same wildcard-matching that exports does.

When TS is set up to not use a `moduleResolution` of `node16` or `bundler` yet (like legacy `node`/`node10`), then TS would not look into `exports`.

There is `types`, but that only works when resolving the main index module, like `import from 'ember-cli-page-object'`, but all other submodules like `ember-cli-page-object/adapter` would fail to resolve to `types.d.ts`. 

This is removing `types` in favor of `typesVersions`, supporting the same wildcard-matching that `exports` does.
@ro0gr
Copy link
Collaborator

ro0gr commented Jan 30, 2024

Great! Thank you!

@ro0gr ro0gr merged commit de03bb9 into san650:master Jan 30, 2024
14 checks passed
@ro0gr
Copy link
Collaborator

ro0gr commented Jan 30, 2024

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

Successfully merging this pull request may close these issues.

None yet

2 participants