Closed kbalazs-ms closed 1 year ago
I have created https://github.com/GoogleChromeLabs/dictation_support/pull/9 as fix and will push as npm package once reviewed and landed. That should fix your issues and allow the package to be used as you intend.
Initially, we only had usage by including the precompiled SDK directly in mind, but you have a totally valid usage scenario here.
I´ll re-open this until we have an NPM package with appropriate Typescript typings in it
I´m closing this issue as done. npm package has been created, and it has been linked to this github repo. We can handle the request for automated npm publishing in another issue (if needed)
Hi there!
We are integrating Philips device support into our web application, and aim to use
dictation_support
. Our issue is that there is no available NPM package (preferably published in the NPM registry) with appropriate Typescript typings in it, that we could just easily add to our project.The supplied (generated)
index.d.ts
file follows the "module" logic (declares modules) but when including said modules in for example a WebPack based bundled project, the modules are not found ("moduleResolution": "node",
), there are no corresponding module folder structure.Example imports with the supplied
index.d.ts
:The buid process fails with
module 'dictation_support' not found
without aliasing the resolved importsSo in order to use the build
index.d.ts
, we have to either:package.json
pointing to thesdk.js
or rename it toindex.js
DictationSupport
and put everything from everydeclare module 'xyz'
into that declared namespace, and register it globally, in order to use the types for the library correctly from a Typescript project.Although the above approaches are workable, they require extensive manual maintenance if anything gets updated in this library and completely lack versioning.
I think it would be really beneficial for the ease-of-use and maintaining aspects of this project if it would have an appropriate NPM package released and constantly updated with changes. All integrators would have a much easier (and standard) way of using the package and would probably help with the adoption rate as well!
Thanks in advance!