Skip to main content

PrimaryKeyType

@webda/models


Type Alias: PrimaryKeyType<T>

PrimaryKeyType<T> = PK<T, T[typeof WEBDA_PRIMARY_KEY][number]> & object

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

Get the primary key type of the object

The main difference with the PrimaryKey type is that if the primary key is a not union type, it will be returned as a single type, otherwise it will be returned as a Pick type

The PrimaryKey will always return a Pick type

Type Declaration​

toString()​

toString(): string

Returns​

string

Type Parameters​

T​

T extends Storable<any, any>