Replies: 0 comments 2 replies
-
|
I've documented this internally as a bug on our tracker for engineering to pick up. Do you have any example packages |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Similar to npm/feedback#122
Typescript 4.7 now supports the
exportsfieldhttps://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#package-json-exports-imports-and-self-referencing)
and adds a
typesimport condition.{ "name": "my-package", "type": "module", "exports": { ".": { "types": "./types/index.d.ts", "default": "./lib/index.js" }, "./foo": { "types": "./types/foo.d.ts", "default": "./lib/foo.js" } } }Note that the "types" condition should always come first in "exports".
Currently if a package only use the exports field with types the TS icon doesn't appear.
Will this be supported ?
Beta Was this translation helpful? Give feedback.
All reactions