mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-07 10:40:13 +00:00
Merge pull request #34007 from seangenabe/then-eos-1
Add type definitions for then-eos
This commit is contained in:
12
types/then-eos/index.d.ts
vendored
Normal file
12
types/then-eos/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for then-eos 1.0
|
||||
// Project: https://github.com/meoguru/node-then-eos
|
||||
// Definitions by: Sean Marvi Oliver Genabe <https://github.com/seangenabe>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
|
||||
type Stream = NodeJS.ReadableStream | NodeJS.WritableStream;
|
||||
|
||||
declare function thenEos(stream: Stream): Promise<void>;
|
||||
|
||||
export = thenEos;
|
||||
10
types/then-eos/then-eos-tests.ts
Normal file
10
types/then-eos/then-eos-tests.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import eos = require("then-eos");
|
||||
|
||||
declare const readable: NodeJS.ReadableStream;
|
||||
declare const writable: NodeJS.WritableStream;
|
||||
|
||||
// $ExpectType Promise<void>
|
||||
eos(readable);
|
||||
|
||||
// $ExpectType Promise<void>
|
||||
eos(writable);
|
||||
23
types/then-eos/tsconfig.json
Normal file
23
types/then-eos/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",
|
||||
"then-eos-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/then-eos/tslint.json
Normal file
1
types/then-eos/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user