6 ms·
> To this day I haven't found a way of doing this in TS You use an ambient declaration to declare the missing classish part of the type. declare function
by wwwigham 4y ago
> To this day I haven't found a way of doing this in TS
You use an ambient declaration to declare the missing classish part of the type.
declare function myLibrary(arg: Type): myLibrary;
declare class myLibrary {
member: Type;
constructor(arg: Type);
}
You see this pattern pretty often in DefinitelyTyped.