Missing TypeScript typings for `escalade/sync`

#5 · closed · 3 comments

View on GitHub ↗

NMinhNguyen

Hey @lukeed! Many thanks for this great package :slightly_smiling_face:. I wanted to use `escalade/sync` in my TypeScript project but it appears that there's no types for the synchronous API. I'm not sure how the types are currently being generated, but presumably we'd need to point `bundt` at the synchronous entry point as well?

Comments

NMinhNguyen

Hm, actually I just noticed that there are types for `escalade/sync` (https://unpkg.com/browse/[email protected]/index.d.ts) so maybe what's happening is that when I import `escalade/sync`, then it doesn't use this `index.d.ts` file and thus it can't resolve the types?

lukeed

Hey, thanks :) You're right, importing into the sub-module bypasses the `index.d.ts` entirely. It works fine if you (or something else in your chain) imports `escalade` so that the definitions get loaded. This was solved by 283b57115cc0310380680e8d72bfc55c4083ce21 but I never published an update. Will do so now.

lukeed

Available in v3.1.0 Thanks for the reminder~!