arethetypeswrong / arethetypeswrong.github.io

Tool for analyzing TypeScript types of npm packages
https://arethetypeswrong.github.io
MIT License
1.12k stars 38 forks source link

Why are paths with colons unresolvable? #154

Closed NullVoxPopuli closed 6 months ago

NullVoxPopuli commented 6 months ago

here is my repro: https://stackblitz.com/edit/stackblitz-starters-d2rfdx?description=Starter%20project%20for%20Node.js,%20a%20JavaScript%20runtime%20built%20on%20Chrome%27s%20V8%20JavaScript%20engine&file=my-library%2Fpackage.json,.gitignore,my-library%2F.attw.json,package.json,my-library%2Fcolon%3Ahere.d.ts&file=consumer%2Findex.ts,my-library%2F.attw.json&title=node.new%20Starter

tl;dr:

I want to import package-name/sub-path:colon

but it seems not allowed? and I can't figure out why? this could be a TS bug, too -- as far as I can tell, : works just fine at runtime.

I opened an issue here: https://github.com/microsoft/TypeScript/issues/57529

NullVoxPopuli commented 6 months ago

Gonna close this, because the answer is to declare ambient type declarations, rather than rely on package.json#exports

andrewbranch commented 6 months ago

Yep: #107