TypeScript type access
antt0n opened this issue · 1 comments
antt0n commented
Hello,
I'm currently working on a TypeScript project, but I have a problem: I can't export the types.
This causes a problem during compilation: I can't specify a type to which I don't have access.
My goal is simply to store an instance of a port in a class variable.
Here is an example :
import jzz from 'jzz'
class Midi {
private _port = jzz().openMidiOut();
private _midiOut: typeof _port; // <= This is the only solution I could find to get around the problem
...
public get out() { // <= And now it's here that I have an error because of the type.
return this._midiOut;
}
I can indeed specify the any
type to allow me to override this error, but it bothers me for the sake of clarity.
Thanks in advance for your help!
jazz-soft commented
Thanks for the notice!
I have not updated index.d.ts for quite a while due to the lack of time.
I would really appreciate if anybody could take care of the TypeScript side of the project...