Listener class is not being exported
See original GitHub issueDescription The Listener class (and maybe some others) are not being exposed to the user, so it’s impossible to use them in type definitions. Example:
import WebMidi from "webmidi"
class MidiManager {
private activeListeners: WebMidi.Listener[] // Not possible -- Listener class is not exported
...
}
Environment:
- Library version and flavour: CJS 3.0.21
- Runtime: Browser (Webpack)
- Language: Typescript
- Operating system: Ubuntu Linux 20.04
Details None
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Javascript - Creating an event listener for an exported class
I'm calling the functions paddle.listener() paddle.keyDownHandler(); paddle.keyUpHandler(); in this order but its not producing the same result ...
Read more >Data is not exported by the publish channel even if the listener ...
If the listener is enabled for the publish channel, the data is exported when a record for the corresponding object is updated.
Read more >Exporting a Browser Event Listener Class in TypeScript
There are many ways to do this (depending on your setup) including export, import,include, require, and others. However, these might not work if...
Read more >Entity Listeners and Subscribers - typeorm - GitBook
Note: Do not make any database calls within a listener, opt for subscribers ... export class PostSubscriber implements EntitySubscriberInterface<Post> {.
Read more >Creating and registering a new execution listener
An ExecutionListener class is a listener for events that will be activated during execution of a model. The following are all available ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has been pushed in release v3.0.22. Thanks for suggesting this enhancement.
As far as I know it should not cause any harm, as the declarations in
webmidi.d.ts
are just typings – they only tell the typescript compiler how the data structures “look” and will not collide with / override the javascript definitions.