-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
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.
TomMarius, jwbay, weswigham, arusakov and timocov
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript