@types/slice-source
TypeScript icon, indicating that this package has built-in type declarations

0.4.3 • Public • Published

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

// 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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/slice-source

Weekly Downloads

81

Version

0.4.3

License

MIT

Unpacked Size

3.34 kB

Total Files

5

Last publish

Collaborators

  • types