atom-typescript icon indicating copy to clipboard operation
atom-typescript copied to clipboard

autocomplete - no indication for optional properties

Open eliorcohen opened this issue 11 years ago • 1 comments

Hi guys,

i have created a basic interface with 3 properties, one of them is optional.

interface IClass1Params {
    name: string;
    phoneNumber: number;
    description?: string;
}

when i'm trying to create a new instance that implement the interface, i'm using the autocomplete as my guideline, but i have no indication which property is mandatory or optional..

screen shot 2015-07-21 at 11 37 18 pm

as a result i need to check the interface explicitly by going to the definition and observe the structure it's a little pain..

thanks, Elior

eliorcohen avatar Jul 21 '15 20:07 eliorcohen

Sample:

interface IClass1Params {
    name?: string;
    phoneNumber: number;
}
var foo:IClass1Params = {
    /*here*/
}

basarat avatar Jul 27 '15 02:07 basarat