Take a look at the WidgetFactory example typescriptlang.org/Handbook#writing-dts-files-examples. If you already have a .ts code for the class with the factory method... then just use the --declaration command line option of the tsc compiler and it will spit out the .d.ts file for you
WidgetFactoryexample typescriptlang.org/Handbook#writing-dts-files-examples. If you already have a.tscode for the class with the factory method... then just use the--declarationcommand line option of thetsccompiler and it will spit out the.d.tsfile for you