4 changed files with 4273 additions and 4254 deletions
@ -0,0 +1,27 @@ |
|||||||
|
declare module "node-webvtt" { |
||||||
|
interface Cue { |
||||||
|
identifier: string; |
||||||
|
start: number; |
||||||
|
end: number; |
||||||
|
text: string; |
||||||
|
styles: string; |
||||||
|
} |
||||||
|
interface Options { |
||||||
|
meta?: boolean; |
||||||
|
strict?: boolean; |
||||||
|
} |
||||||
|
type ParserError = Error; |
||||||
|
interface ParseResult { |
||||||
|
valid: boolean; |
||||||
|
strict: boolean; |
||||||
|
cues: Cue[]; |
||||||
|
errors: ParserError[]; |
||||||
|
meta?: Map<string, string>; |
||||||
|
} |
||||||
|
interface Segment { |
||||||
|
duration: number; |
||||||
|
cues: Cue[]; |
||||||
|
} |
||||||
|
function parse(text: string, options: Options): ParseResult; |
||||||
|
function segment(input: string, segmentLength?: number): Segment[]; |
||||||
|
} |
Loading…
Reference in new issue