I'm currently creating my first declaration file for a foreign library(react-native-background-timer). The library though has an default export I'm not sure how to declare in the index.d.ts file.
This is the default export of the library:
export default new BackgroundTimer();
I'm aware how to declare exported classes, but what's the best way to declare an exported class instance?
My first approach was:
declare class BackgroundTimer {
[...]
}
declare const _BackgroundTimer: BackgroundTimer;
export default _BackgroundTimer;