Detect packages with TypeScript but without a `types` field in package.json
sindresorhus opened this issue · comments
Would be nice if the search would correctly detect a package as TypeScript in the case where a package has a index.d.ts
file in root, but not a types
field in package.json
. That's a common occurrence and it's allowed by TypeScript to omit the types
field if the definition file uses the name index.d.ts
.
Context: #407 (comment)
Do you have an example package that doesn’t get detected yet? That’ll make implementing this easier :)
It was https://github.com/sindresorhus/type-fest, but now we've added a types field to work around it: sindresorhus/type-fest@1fe98c2
I think the code might have been assuming a main
field, which is why it doesn't work yet