Skip to content

Commit

Permalink
add doc, #105
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 6, 2023
1 parent c0dec77 commit 0aa828a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/optionize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const merge4 = ( a: IntentionalAny, b?: IntentionalAny, c?: IntentionalAny, d?:
// ParentOptions = The public API for parent options, this will be exported by the parent class, like "NodeOptions"
// KeysUsedInSubclassConstructor = list of keys from ParentOptions that are used in this constructor.
export default function optionize<ProvidedOptions,
SelfOptions = ProvidedOptions,
SelfOptions = ProvidedOptions, // By default, every optional option in the ProvidedOptions must have a default unless you specify another object for SelfOptions
ParentOptions = Record<never, never>>():
<KeysUsedInSubclassConstructor extends keyof ( ParentOptions )>(
defaults: OptionizeDefaults<SelfOptions, ParentOptions, ProvidedOptions>,
Expand All @@ -63,7 +63,7 @@ export default function optionize<ProvidedOptions,

// Use this function to gain the typing that optionize provides but in a case where the first argument is an empty object.
export function optionize3<ProvidedOptions,
SelfOptions = ProvidedOptions,
SelfOptions = ProvidedOptions, // By default, every optional option in the ProvidedOptions must have a default unless you specify another object for SelfOptions
ParentOptions = Record<never, never>>():
<KeysUsedInSubclassConstructor extends keyof ( ParentOptions )>(
emptyObject: ObjectWithNoKeys,
Expand Down

0 comments on commit 0aa828a

Please sign in to comment.