Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

default value typing question #59

Open
SteelAlloy opened this issue Aug 23, 2019 · 0 comments
Open

default value typing question #59

SteelAlloy opened this issue Aug 23, 2019 · 0 comments

Comments

@SteelAlloy
Copy link

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[];
};
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant