I use a node module that's not found by typings and doesn't exist in definelytyped.
the basic use of the module is:
import * as someFunc from 'some-module';
someFunc("some string");
As you can see, this module exports a function as its default. I haven't figured out how to write the declaration file for it.
This is the best I managed to do:
declare module 'some-module' {
export default function someFunc(someArg: string): void;
}
BTW it does work JavaScriptly. It's only the TypeScript bothers me.
Any ideas how to solve that?
via Alon
No comments:
Post a Comment