mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[destroy-on-hwm] add typings
This commit is contained in:
parent
7ad5650b35
commit
01725e3388
10
types/destroy-on-hwm/destroy-on-hwm-tests.ts
Normal file
10
types/destroy-on-hwm/destroy-on-hwm-tests.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { PassThrough } from 'stream';
|
||||
import destroyOnHWM = require('destroy-on-hwm');
|
||||
|
||||
const stream = new PassThrough();
|
||||
|
||||
destroyOnHWM(stream); // $ExpectType PassThrough
|
||||
destroyOnHWM(stream, function(stream) {
|
||||
this; // $ExpectType PassThrough
|
||||
stream; // $ExpectType PassThrough
|
||||
});
|
||||
12
types/destroy-on-hwm/index.d.ts
vendored
Normal file
12
types/destroy-on-hwm/index.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Type definitions for destroy-on-hwm 1.0
|
||||
// Project: https://github.com/stream-utils/destroy-on-hwm
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="node" />
|
||||
import { Writable } from 'stream';
|
||||
|
||||
export = destroyOnHwm;
|
||||
|
||||
declare function destroyOnHwm<T extends Writable>(stream: T, callback?: (this: T, stream: T) => void): T;
|
||||
22
types/destroy-on-hwm/tsconfig.json
Normal file
22
types/destroy-on-hwm/tsconfig.json
Normal file
@ -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-on-hwm-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/destroy-on-hwm/tslint.json
Normal file
1
types/destroy-on-hwm/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user