Skip to content
Client
Server

Reference / @open-music-sdk/core / tSchemaLike

Interface: tSchemaLike<T> ​

Defined in: packages/core/src/client.ts:66

Anything with a Standard Schema validate, such as the validators in @open-music-sdk/validate.

Type Parameters ​

T ​

T

Properties ​

~standard ​

ts
readonly ~standard: object;

Defined in: packages/core/src/client.ts:68

The Standard Schema interface: the one part of a schema the client reads.

validate ​

ts
readonly validate: (value) => 
  | tSchemaResult<T>
| Promise<tSchemaResult<T>>;

Judges a value: gives it back, typed, or the issues found. The client awaits it, so it may be async.

Parameters ​
value ​

unknown

Returns ​

| tSchemaResult<T> | Promise<tSchemaResult<T>>

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.