Musique/node_modules/m3u8stream/dist/parser.d.ts

20 lines
530 B
TypeScript
Raw Normal View History

2021-12-04 19:00:33 +00:00
/// <reference types="node" />
import { Writable } from 'stream';
export interface Item {
url: string;
seq: number;
duration: number;
time?: number;
range?: {
start: number;
end: number;
};
init?: boolean;
}
export interface Parser extends Writable {
on(event: 'item', listener: (item: Item) => boolean): this;
on(event: string | symbol, listener: (...args: any[]) => any): this;
emit(event: 'item', item: Item): boolean;
emit(event: string, ...args: any[]): boolean;
}