mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
stdout-stream: initial definition (#39329)
This commit is contained in:
committed by
Wesley Wigham
parent
be4cd49eef
commit
b9860d1a6a
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// Type definitions for stdout-stream 1.4
|
||||
// Project: https://github.com/mafintosh/stdout-stream#readme
|
||||
// Definitions by: Junxiao Shi <https://github.com/yoursunny>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
import { Writable } from "stream";
|
||||
|
||||
interface StdoutStream extends Writable {
|
||||
readonly _isStdio: true;
|
||||
readonly isTTY: boolean;
|
||||
}
|
||||
|
||||
declare var stdout: StdoutStream;
|
||||
|
||||
export = stdout;
|
||||
@@ -0,0 +1,10 @@
|
||||
import stdout = require("stdout-stream");
|
||||
|
||||
stdout.write("hello");
|
||||
stdout.end();
|
||||
|
||||
// $ExpectType true
|
||||
stdout._isStdio;
|
||||
|
||||
// $ExpectType boolean
|
||||
stdout.isTTY;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"stdout-stream-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user