Client
Server
Reference / @open-music-sdk/core / optionsOf
function optionsOf<T>(
fn,
options,
what
): T;Defined in: packages/core/src/check.ts:54
An options bag as this call's own: what the caller's object holds itself, and the empty bag when none was given. The types rule anything but a plain object out, and a caller without them can still pass it.
T extends object
string
The name of the function the options were handed to, for the error.
T | undefined
What the caller gave, or undefined for nothing.
string
What the error says was expected, such as "an options object".
T
The options' own properties as a new object with no prototype; an empty one when options is undefined.
TypeError if options is neither undefined nor a plain object.