how can I create a typescript definition file "*.d.ts" for a class inside a namespace with constructor arguments (existing javascript library). I tried several combinations of a module with a nested interface, but nothing worked so far.
Example:
var instance = new Namespace.TargetClass(arg1, arg2);
instance.someFunc(arg3);
declare module Namespace {
class TargetClass {
constructor(arg1: string, arg2: number);
someFunc(arg3: any): void;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With