# @types/slice-source

> TypeScript definitions for slice-source

Latest version **0.4.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/slice-source
pnpm add @types/slice-source
yarn add @types/slice-source
bun add @types/slice-source
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.3 |
| Published | 2023-11-07 |
| First published | 2020-09-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/slice-source
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slice-source
- npm.io page: https://npm.io/package/@types/slice-source

## Recent versions

- 0.4.3 (latest) — 2023-11-07
- 0.4.1 (ts3.3) — 2021-01-08
- 0.4.0 (ts3.2) — 2020-09-17
- 0.4.2 — 2023-10-18

## README

# 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).

---
_Source: https://npm.io/package/@types/slice-source · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
