howler.js icon indicating copy to clipboard operation
howler.js copied to clipboard

Type definitions in the NPM package

Open turadg opened this issue 7 years ago • 3 comments

Feature request for official type definitions, ideally packaged in the NPM distribution.

This came up two years ago in https://github.com/goldfire/howler.js/issues/584 and was rejected but since then TypeScript and Flow have taken off.

turadg avatar Aug 31 '18 18:08 turadg

Does the @types/howler library not work? https://www.npmjs.com/package/@types/howler

goldfire avatar Sep 07 '18 19:09 goldfire

Yes for Typescript and no for Flow.

I hadn't seen that @types/howler package but I assume it works well for TypeScript. It would be nice to have those managed in the howler package itself, but not a big deal.

However, there are no types for Flow. So I'd still like to advocate for official type defs in this repo, perhaps that generated by def styles.

turadg avatar Sep 07 '18 20:09 turadg

I added native TypeScript definition exports while I refactored the core modules to native ESM today.

Check it out and please help out if you also want to see this in production! :)

#1518

Greenheart avatar Sep 26 '21 00:09 Greenheart