Skip to content
Client
Server

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

Function: ownOf() ​

ts
function ownOf<T>(bag): T;

Defined in: packages/core/src/check.ts:24

What an object holds itself, each property read once, as an object of this call's own that inherits nothing. A property is then there or it is not, whatever other code has put on Object.prototype: an option nobody passed cannot be found there.

Type Parameters ​

T ​

T extends object

Parameters ​

bag ​

T

The object to read.

Returns ​

T

A new object with bag's own enumerable properties and a null prototype.

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