Revert "drafted types for isstream"

This reverts commit c3a09c5c34.
This commit is contained in:
Claas Ahlrichs
2019-04-14 14:39:35 +02:00
parent e8fa44b4c2
commit 7a65cbca2c
3 changed files with 28 additions and 47 deletions

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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",