adamritter / nostr-relaypool-ts

A Nostr RelayPool implementation in TypeScript using only nostr-tools library as a dependency
https://www.npmjs.com/package/nostr-relaypool
MIT License
63 stars 17 forks source link

🏷️ Use "import type" when possible #41

Closed coyotte508 closed 1 year ago

coyotte508 commented 1 year ago

Ensure that import type is used when possible

Motivation

See https://github.com/microsoft/TypeScript/issues/41883

If an application with stricter TS settings includes this module, they will get TS error, no way to ignore it. For example, with the default SvelteKit template, there will be errors.

Alternative is publishing .d.ts files instead of .ts files for the types field in package.json.