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

"types" in package.json does not resolve to a file by default #6466

Closed
orta opened this issue Jun 10, 2021 · 2 comments
Closed

"types" in package.json does not resolve to a file by default #6466

orta opened this issue Jun 10, 2021 · 2 comments

Comments

@orta
Copy link

orta commented Jun 10, 2021

Bug Report

7.1.0 Package JSON

  "types": "index.d.ts",
  "typesVersions": {
    ">=4.2": {
      "*": [
        "dist/types/*"
      ]
    }
  },

Goes to index.d.ts which doesn't exist.

Current Behavior
I haven't implemented the typesVersion resolving in the playground, and so it NOOPs ( microsoft/TypeScript-Website#1316 ). Perhaps if you plan on supporting TS 4.2 and below you could use downlevel-dts.

@orta orta changed the title "types "types" in package.json does not resolve to a file by default Jun 10, 2021
@cartant
Copy link
Collaborator

cartant commented Jun 11, 2021

The value used for the types property is what was recommended here. Also, there are no plans to support TypeScript versions below 4.2, as the types were massively refactored using recent TypeScript features.

@orta
Copy link
Author

orta commented Jun 11, 2021

Ouch TIL'd - I guess the playground would need to support that resolution path too 👍🏻

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

No branches or pull requests

2 participants