Civet
Civet copied to clipboard
Default values in `::` object argument types are `unknown` when they could be inferred
When mixing :: types and default values in function arguments spacing is type unknown when we could probably infer it as number.
export function DisplayOptions({
stage,
position:: Vec2,
options:: {
text: string
onSelect: () => void
}[],
spacing = 60
}) { }
Probably the subtype should default to typeof defaultValue when there's an assigned default value like this. Good idea!