Closed
Description
TypeScript Version: 2.0.3
Code
From the typings for the vinyl
module.
declare class File {
// ...
/**
* Type: Buffer|Stream|null (Default: null)
*/
public contents: Buffer | NodeJS.ReadableStream;
/**
* Returns true if file.contents is a Buffer.
*/
public isBuffer(): boolean;
/**
* Returns true if file.contents is a Stream.
*/
public isStream(): boolean;
/**
* Returns true if file.contents is null.
*/
public isNull(): boolean;
// ...
}
Expected behavior:
Possibility to specify something like this.contents is Buffer
instead of just boolean
for the return type of the methods isBuffer
, isStream
, isNull
.
Actual behavior:
The language doesn't support this.