Closed pixelzoom closed 2 years ago
How about DefaultOptions
?
DefaultOptions
is still too general imo. Defaults for what? OptionizeDefaults
is only 3 chars longer..
The documentation for Defaults says that's it's the defaults for optionize:
// This is the type for the `defaults` argument to optionize
type Defaults<SelfOptions = ...
... so why not name it as such?
Here's a typical example from geometric-optics (FocalLengthControl.ts). What name would look best in this context, while still being sufficiently descriptive?
// Assemble the defaults for NumberControl, because optionize doesn't currently support defaults in multiple objects.
const numberControlDefaults: Defaults<{}, NumberControlOptions> = merge( {}, ..., {
...
} );
const options = optionize<FocalLengthControlOptions, {}, NumberControlOptions>( {}, numberControlDefaults, providedOptions );
I like OptionizeDefaults, thanks for talking it through with me. Please review.
👍🏻 closing
In optionize.ts:
This name is too general. Let's rename to
OptionizeDefaults
.