Skip to content

Type Alias: WrapReactiveModelHook()<T, PK, R, Output>

ts
type WrapReactiveModelHook<T, PK, R, Output> = (
  model: ReactiveModel<T, PK, R>,
) => Output;

Strongly-typed hook for wrapping ReactiveModel instances.

Type Parameters

Type ParameterDefault typeDescription
T extends PlainObject-Model data type
PK extends StringKeyOf<T>-Primary key type
R extends Record<string, RelationshipConfiguration>-Relationships config
Output extends ReactiveModel<T, PK, R>ReactiveModel<T, PK, R>The output (wrapped) type

Parameters

ParameterType
modelReactiveModel<T, PK, R>

Returns

Output