Adds types for stream-array. (#29569)

This commit is contained in:
Tyler Murphy 2018-10-09 11:43:39 -04:00 committed by Andy
parent d883a9fd50
commit b17c41af1e
4 changed files with 41 additions and 0 deletions

11
types/stream-array/index.d.ts vendored Normal file
View 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;

View 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

View 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"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }