question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Listener class is not being exported

See original GitHub issue

Description 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:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
djipcocommented, Nov 17, 2022

This has been pushed in release v3.0.22. Thanks for suggesting this enhancement.

0reactions
Zorby-devcommented, Nov 17, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found