Skip to main content

PrimaryKey

@webda/models


Type Alias: PrimaryKey<T>

PrimaryKey<T> = Pick<T, T[typeof WEBDA_PRIMARY_KEY][number]> & object

Defined in: packages/models/src/storable.ts:201

Get the primary key of the object

The main difference with the PrimaryKeyType type is that it will always return a Pick type

The PrimaryKeyType will return a Pick type only if the primary key is a union type

Type Declaration​

toString()​

toString(): string

Returns​

string

Type Parameters​

T​

T extends Storable<any, any>