Skip to content

Type Alias: ContainerSpec<C> ​

ContainerSpec<C> = object

Defined in: src/types.ts:162

What @ActiveField({ container }) needs from a container flavour. It is made by ActiveCollection.field(), ActiveMap.field() and ActiveSet.field(); the field knows only this shape, so a model never loads a container class you do not import.

Type Parameters ​

C ​

C = unknown

Properties ​

model ​

readonly model: typeof ActiveModel

Defined in: src/types.ts:164

The model whose instances the container holds

Methods ​

wrap() ​

wrap(value): C

Defined in: src/types.ts:166

The container for whatever was assigned: an array/iterable, null/undefined (an empty one) or an existing one

Parameters ​

value ​

unknown

Returns ​

C