diff options
Diffstat (limited to 'node_modules/visibilityjs/index.d.ts')
-rw-r--r-- | node_modules/visibilityjs/index.d.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/visibilityjs/index.d.ts b/node_modules/visibilityjs/index.d.ts new file mode 100644 index 0000000000..4bb8d0297d --- /dev/null +++ b/node_modules/visibilityjs/index.d.ts @@ -0,0 +1,14 @@ +declare module 'visibilityjs' { + export function every(interval: number, callback: Function): number; + export function every(interval: number, hiddenInterval: number, callback: Function): number; + export function onVisible(callback: Function): number|boolean; + export function afterPrerendering(callback: Function): number|boolean; + export function isSupported(): boolean; + export function state(): string; + export function hidden(): boolean; + export function unbind(id: number): void; + export function change(listener: VisiblityChangeListener): number|boolean; + export function stop(id: number): boolean; + + type VisiblityChangeListener = (event: Event, state: string) => void; +} |