mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Adds types for stream-array. (#29569)
This commit is contained in:
parent
d883a9fd50
commit
b17c41af1e
11
types/stream-array/index.d.ts
vendored
Normal file
11
types/stream-array/index.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Type definitions for stream-array 1.1
|
||||
// Project: https://github.com/mimetnet/node-stream-array
|
||||
// Definitions by: Tyler Murphy <https://github.com/Tyler-Murphy>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Readable } from 'stream';
|
||||
|
||||
declare function streamify(array: ReadonlyArray<any>): Readable;
|
||||
|
||||
export = streamify;
|
||||
6
types/stream-array/stream-array-tests.ts
Normal file
6
types/stream-array/stream-array-tests.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import streamify = require('stream-array');
|
||||
|
||||
streamify(); // $ExpectError
|
||||
streamify('abc'); // $ExpectError
|
||||
streamify([]); // $ExpectType Readable
|
||||
streamify([1, '2', { 3: 4 }]); // $ExpectType Readable
|
||||
23
types/stream-array/tsconfig.json
Normal file
23
types/stream-array/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"stream-array-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/stream-array/tslint.json
Normal file
1
types/stream-array/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user