Skip to content

Commit 0a6c958

Browse files
authored
🤖 Merge PR DefinitelyTyped#52786 Add type definitions for streamifier by @idan-at
* Add type definitions for streamifier * add types reference
1 parent ea1c989 commit 0a6c958

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

types/streamifier/index.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Type definitions for streamifier 0.1
2+
// Project: https://github.com/gagle/node-streamifier
3+
// Definitions by: Idan Attias <https://github.com/idan-at>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+
/// <reference types="node" />
7+
8+
import { Readable, ReadableOptions } from "stream";
9+
10+
export function createReadStream(object: string | Buffer | Uint8Array, options?: ReadableOptions): Readable;
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { createReadStream } from "streamifier";
2+
3+
createReadStream(JSON.stringify({ a: 1, b: 2 })).pipe(process.stdout);

types/streamifier/tsconfig.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"lib": [
5+
"es6"
6+
],
7+
"noImplicitAny": true,
8+
"noImplicitThis": true,
9+
"strictFunctionTypes": true,
10+
"strictNullChecks": true,
11+
"baseUrl": "../",
12+
"typeRoots": [
13+
"../"
14+
],
15+
"types": [],
16+
"noEmit": true,
17+
"forceConsistentCasingInFileNames": true
18+
},
19+
"files": [
20+
"index.d.ts",
21+
"streamifier-tests.ts"
22+
]
23+
}

types/streamifier/tslint.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "extends": "dtslint/dt.json" }

0 commit comments

Comments
 (0)