Skip to content

Class: abstract BaseReactiveModel<T, PK, R>

The abstract base class for all reactive models.

Type Parameters

Type ParameterDescription
T extends PlainObjectThe type of the object that will be used as the model.
PK extends StringKeyOf<T>The key of the object which is used as the primary key for the model.
R extends Record<string, RelationshipConfiguration>-

Properties

$deleted

Get Signature

ts
get $deleted(): boolean;

A boolean indicating whether the model has been deleted.

Returns

boolean


$dirty

Get Signature

ts
get $dirty(): boolean;

A boolean indicating whether the model has any pending changes.

Returns

boolean


$key

Get Signature

ts
get $key(): PK;

The value of the primary key for the instance of the model.

Returns

PK


$pending

Get Signature

ts
get $pending(): Partial<Record<Extract<keyof T, string>, Omit<PendingStateChange<T, Extract<keyof T, string>>, "property">>>;

An object containing all of the pending changes to be made to the model

Returns

Partial<Record<Extract<keyof T, string>, Omit<PendingStateChange<T, Extract<keyof T, string>>, "property">>>