The npmjs website doesn’t show the TypeScript badge for packages that use simple package exports #134258
Replies: 4 comments
-
|
Looks like it's required to have a "top" level I had {
"exports": {
".": {
"types": "./src/types/index.d.ts",
"import": "./src/index.js"
},
}
}So will try adding the |
Beta Was this translation helpful? Give feedback.
-
|
I use a stub file for this. Kinda sucks that there's no other way. https://github.com/qualcomm/qualcomm-ui/blob/main/packages/frameworks/react/package.json#L16 /**
* @packageDocumentation
* This file is here to ensure that npm shows the TypeScript badge.
* This package uses secondary entrypoints only.
* Import from 'pkg/subpath1', 'pkg/subpath2', etc.
*/
export {}
|
Beta Was this translation helpful? Give feedback.
-
|
Uploading 9f0c30220764f83c2b5ad2c14c423164.mp4… |
Beta Was this translation helpful? Give feedback.
-
|
Bonsoir |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
codemirror-languageserviceis fully typed, but it doesn’t have the TypeScript badge on the package page on npmjs.com.See https://arethetypeswrong.github.io/?p=codemirror-languageservice@0.1.0 for details. I decided to not support the
node10module resolution, as people should no longer use that in their projects.Beta Was this translation helpful? Give feedback.
All reactions