-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.test-d.ts
More file actions
12 lines (10 loc) · 757 Bytes
/
index.test-d.ts
File metadata and controls
12 lines (10 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
import {expectType, expectError} from 'tsd';
import {readableNoopStream, writableNoopStream} from './index.js';
expectType<NodeJS.ReadableStream>(readableNoopStream());
expectType<NodeJS.ReadableStream>(readableNoopStream({size: 10}));
expectType<NodeJS.ReadableStream>(readableNoopStream({size: Number.POSITIVE_INFINITY}));
expectType<NodeJS.ReadableStream>(readableNoopStream({objectMode: true}));
expectType<NodeJS.WritableStream>(writableNoopStream());
expectType<NodeJS.WritableStream>(writableNoopStream({objectMode: true}));
expectError(readableNoopStream({read: () => {}})); // eslint-disable-line @typescript-eslint/no-empty-function
expectError(writableNoopStream({write: () => {}})); // eslint-disable-line @typescript-eslint/no-empty-function