UNPKG

@types/slice-source

Version:
35 lines (26 loc) 1 kB
# Installation > `npm install --save @types/slice-source` # Summary This package contains type definitions for slice-source (https://github.com/mbostock/slice-source). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slice-source. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slice-source/index.d.ts) ````ts // tslint:disable-next-line:use-default-type-parameter declare function slice(source: ReadableStream | ReadableStreamReader<any> | SliceSource): SliceSource; interface SliceChunk { value: Uint8Array; done: boolean; } interface SliceSource { slice(length: number): Promise<Uint8Array>; read(): Promise<SliceChunk>; cancel(): Promise<void>; } export = slice; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: none # Credits These definitions were written by [Björn Harrtell](https://github.com/bjornharrtell).