Can typescript type alias support default arguments? For instance:
export type SomeType = {
typename: string;
strength: number;
radius: number;
some_func: Function;
some_other_stat: number = 8; // <-- This doesn't work
}
The error is A type literal property cannot have an initializer.
I can't find documentation relating to this - type
keyword is very obscure behind everything else that is also named type. Is there anything I can do to have default argument value for type
in typescript?