mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
34
types/isstream/index.d.ts
vendored
34
types/isstream/index.d.ts
vendored
@@ -1,19 +1,39 @@
|
||||
// Type definitions for isstream 0.1
|
||||
// Project: https://github.com/rvagg/isstream
|
||||
// Definitions by: Claas Ahlrichs <https://github.com/claasahl>
|
||||
// Definitions by: My Self <https://github.com/me>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export = isstream;
|
||||
|
||||
declare function isstream(obj: any): boolean;
|
||||
declare function isstream(obj: any): any;
|
||||
|
||||
declare namespace isstream {
|
||||
function isDuplex(obj: any): boolean;
|
||||
const prototype: {
|
||||
};
|
||||
|
||||
function isReadable(obj: any): boolean;
|
||||
function isDuplex(obj: any): any;
|
||||
|
||||
function isReadable(obj: any): any;
|
||||
|
||||
function isWritable(obj: any): any;
|
||||
|
||||
namespace isDuplex {
|
||||
const prototype: {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace isReadable {
|
||||
const prototype: {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace isWritable {
|
||||
const prototype: {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
function isWritable(obj: any): boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
import isStream, {isReadable, isWritable, isDuplex} from 'isstream';
|
||||
import * as Stream from 'stream';
|
||||
|
||||
isStream(new Stream()) // true
|
||||
|
||||
isStream({}) // false
|
||||
|
||||
isStream(new Stream.Readable()) // true
|
||||
isStream(new Stream.Writable()) // true
|
||||
isStream(new Stream.Duplex()) // true
|
||||
isStream(new Stream.Transform()) // true
|
||||
isStream(new Stream.PassThrough()) // true
|
||||
|
||||
|
||||
|
||||
|
||||
isReadable(new Stream()) // false
|
||||
isWritable(new Stream()) // false
|
||||
isDuplex(new Stream()) // false
|
||||
|
||||
isReadable(new Stream.Readable()) // true
|
||||
isReadable(new Stream.Writable()) // false
|
||||
isReadable(new Stream.Duplex()) // true
|
||||
isReadable(new Stream.Transform()) // true
|
||||
isReadable(new Stream.PassThrough()) // true
|
||||
|
||||
isWritable(new Stream.Readable()) // false
|
||||
isWritable(new Stream.Writable()) // true
|
||||
isWritable(new Stream.Duplex()) // true
|
||||
isWritable(new Stream.Transform()) // true
|
||||
isWritable(new Stream.PassThrough()) // true
|
||||
|
||||
isDuplex(new Stream.Readable()) // false
|
||||
isDuplex(new Stream.Writable()) // false
|
||||
isDuplex(new Stream.Duplex()) // true
|
||||
isDuplex(new Stream.Transform()) // true
|
||||
isDuplex(new Stream.PassThrough()) // true
|
||||
@@ -7,15 +7,13 @@
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user