ksm2 / isomorphic-streams

Isomorphic WHATWG Streams API package for browser and Node.js
MIT License
14 stars 3 forks source link

Added types to exports to support TypeScript with node12 module resolution #1

Closed argon-dev closed 2 years ago

argon-dev commented 2 years ago

When using "moduleResolution": "node12" (currently requires nightly TS), if exports is specified, then TypeScript will ignore the top-level main, types, etc. Because of this, it cannot find the type definitions. Adding the types to exports fixes this.

ksm2 commented 2 years ago

@argon-dev Thank you for your contribution!