added typings for typescript

This commit is contained in:
Kallu609
2019-01-30 22:59:16 +02:00
parent c785cd5032
commit 9776960064

18
index.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
declare module "srt-webvtt" {
class WebVTTConverter {
constructor(resource: Blob);
public blobToBuffer(): Promise<Uint8Array | string>;
public static blobToString(
blob: Blob,
success: (result: string) => void,
fail: () => void
): void;
public static toVTT(utf8str: string): string;
public static toTypedArray(str: string): Uint8Array;
public getURL(): Promise<string>;
public release(): void;
}
export default WebVTTConverter;
}