parser icon indicating copy to clipboard operation
parser copied to clipboard

default value typing question

Open SteelAlloy opened this issue 5 years ago • 0 comments

I thought that by declaring the default attribute in a flag, it would set it to the type I put. But it's <T | undefined> and it's a problem for me. Is it intentional?

IMO it should not be undefined since it's default.

export declare type IOptionFlag<T> = IFlagBase<T, string> & {
    type: 'option';
    helpValue?: string;
    default?: Default<T | undefined>;
    multiple: boolean;
    input: string[];
    options?: string[];
};
```

SteelAlloy avatar Aug 23 '19 09:08 SteelAlloy