RockPaperScissors/node_modules/m3u8stream/dist/parser.d.ts
2021-12-02 17:15:29 +01:00

20 lines
530 B
TypeScript

/// <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;
}