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

fix: fix types file path cannot be resolved, remove typesVersions field #6621

Closed
wants to merge 1 commit into from

Conversation

zthxxx
Copy link

@zthxxx zthxxx commented Sep 30, 2021

Will cause an error with eslint-import-resolver-typescript, due to missing types files.

And make the field typesVersions is meaningless, because it doesn't support ts version < 4.2 at rxjs@7.

image

image

@zthxxx
Copy link
Author

zthxxx commented Sep 30, 2021

@kwonoj

@cartant
Copy link
Collaborator

cartant commented Sep 30, 2021

#6466 (comment)

@cartant
Copy link
Collaborator

cartant commented Oct 1, 2021

I'm closing this because the resolution implementation to which you've linked in eslint-import-resolver-typescript is incorrect - see this explanation from a TypeScript contributor. As outlined in the package.json, RxJS v7 requires TypeScript 4.2 or greater. The incorrect resolution in eslint-import-resolver-typescript is not something for which RxJS is responsible.

@cartant cartant closed this Oct 1, 2021
@zthxxx
Copy link
Author

zthxxx commented Oct 1, 2021

@cartant May I ask why need typesVersions field, and what's the use of "dist/types/*"? What's helpful of it rather than "types": "./dist/types/index.d.ts"?

@cartant
Copy link
Collaborator

cartant commented Oct 1, 2021

Two reasons:

  • it's a mechanism through which it can be made clear that 4.2 is the minimum-supported version of TypeScript for RxJS; and
  • it's a mechanism that we could use to update the types - without breaking people - to take advantage of any useful features offered by newer versions of TypeScript. That is, we could add an additional entry in typesVersions. In v7, the types were simplified quite a bit, but there are still some that are complicated and I like to hope that future versions of TS will offer features that could be used to further simplify them.

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

Successfully merging this pull request may close these issues.

None yet

2 participants