You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In WilderOptionsPatterns.ts, why do this? (Why use combineOptions)
// Feel free to name "initial" to house the type returned from optionizeconstinitialOptions=optionize<CoffeeCupOptions,StrictOmit<CoffeeCupOptions, 'handleOptions' | 'isABigCup'>>()({percentFilled: 30},providedOptions);// combineOptions can be helpful when providing defaults to nestedOptions.initialOptions.handleOptions=combineOptions<HandleOptions>({length: 4// CoffeeCups have larger handles},initialOptions.handleOptions);
Instead of this?
// Feel free to name "initial" to house the type returned from optionizeconstinitialOptions=optionize<CoffeeCupOptions,StrictOmit<CoffeeCupOptions, 'isABigCup'>>()( {
percentFilled: 30,
handleOptions: {
length: 4
}
}, providedOptions );
@zepumph mentioned that this seems buggy and that another optionize call might be better. But I was also wondering why that is necessary, what does the second optionize/combineOptions call for nested options offer?
The text was updated successfully, but these errors were encountered:
Over slack I asked
@zepumph mentioned that this seems buggy and that another
optionize
call might be better. But I was also wondering why that is necessary, what does the second optionize/combineOptions call for nested options offer?The text was updated successfully, but these errors were encountered: