mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #19177 from BendingBender/destroy
[destroy] add typings
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import destroy = require('destroy');
|
||||
import * as fs from 'fs';
|
||||
|
||||
const stream = fs.createReadStream('package.json');
|
||||
|
||||
// $ExpectType ReadStream
|
||||
destroy(stream);
|
||||
// $ExpectType WriteStream
|
||||
destroy(process.stderr);
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for destroy 1.0
|
||||
// Project: https://github.com/stream-utils/destroy
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
import { Stream } from 'stream';
|
||||
|
||||
export = destroy;
|
||||
|
||||
declare function destroy<T extends Stream>(stream: T): T;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"destroy-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user