Type aliases
ModelConsumer
ModelConsumer<M>: unknown
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/ModelConsumer.d.ts:5
Type parameters
ModelConsumerType
ModelConsumerType<M>: M extends { modelConsumers: ReadonlyArray < infer MC> } ? MC : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/ModelConsumer.d.ts:2
Type parameters
ModelContextType
ModelContextType<M>: M extends { modelContext: infer MC } ? MC : unknown
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/ModelContext.d.ts:2
Type parameters
ModelDownlinkConsumer
ModelDownlinkConsumer<M>: unknown
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelDownlinkConsumer.d.ts:5
Type parameters
ModelDownlinkConsumerType
ModelDownlinkConsumerType<M>: M extends { downlinkConsumers: ReadonlyArray < infer MC> } ? MC : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelDownlinkConsumer.d.ts:2
Type parameters
ModelDownlinkDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelDownlink.d.ts:31
Type parameters
ModelDownlinkDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelDownlink.d.ts:32
Type parameters
ModelDownlinkFlags
ModelDownlinkFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelDownlink.d.ts:30
ModelEventDownlinkDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelEventDownlink.d.ts:8
Type parameters
ModelEventDownlinkDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelEventDownlink.d.ts:9
Type parameters
ModelFastenerDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelFastener.d.ts:20
Type parameters
ModelFastenerFlags
ModelFastenerFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelFastener.d.ts:5
ModelFastenerMemberInit
Model
FastenerMemberInit<M, K>: M [ K ] extends ModelFastener < any , infer S, infer U> ? S | U : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelFastener.d.ts:4
Type parameters
ModelFastenerMemberType
Model
FastenerMemberType<M, K>: M [ K ] extends ModelFastener < any , infer S, any > ? S : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelFastener.d.ts:3
Type parameters
ModelFlags
ModelFlags: number
ModelListDownlinkDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelListDownlink.d.ts:11
Type parameters
ModelListDownlinkDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelListDownlink.d.ts:12
Type parameters
ModelManagerObserverType
ModelManagerObserverType<MM>: MM extends { modelManagerObservers: ReadonlyArray < infer MMO> } ? MMO : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/manager/ModelManagerObserver.d.ts:3
Type parameters
ModelMapDownlinkDescriptor
Model
MapDownlinkDescriptor<M, K, V, KU, VU, I>: ModelMapDownlinkInit < K , V , KU , VU > & ThisType < ModelMapDownlink < M , K , V , KU , VU > & I > & Partial < I >
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelMapDownlink.d.ts:12
Type parameters
K
V
KU = never
VU = never
I = {}
ModelMapDownlinkDescriptorExtends
Model
MapDownlinkDescriptorExtends<M, K, V, KU, VU, I>: { extends: ModelMapDownlinkClass | undefined } & ModelMapDownlinkDescriptor < M , K , V , KU , VU , I >
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelMapDownlink.d.ts:13
Type parameters
K
V
KU = never
VU = never
I = {}
ModelObserverType
ModelObserverType<M>: M extends { modelObservers: ReadonlyArray < infer MO> } ? MO : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/ModelObserver.d.ts:4
Type parameters
ModelPrecedence
ModelPrecedence: number
ModelPropertyDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:23
Type parameters
ModelPropertyDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:24
Type parameters
ModelPropertyDescriptorFromAny
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:27
Type parameters
ModelPropertyFlags
ModelPropertyFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:9
ModelPropertyMemberInit
Model
PropertyMemberInit<M, K>: M [ K ] extends ModelProperty < any , infer T, infer U> ? T | U : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:4
Type parameters
ModelPropertyMemberKey
Model
PropertyMemberKey<M, K>: M [ K ] extends ModelProperty < any , any > ? K : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:5
Type parameters
ModelPropertyMemberMap
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:6
Type parameters
ModelPropertyMemberType
Model
PropertyMemberType<M, K>: M [ K ] extends ModelProperty < any , infer T, any > ? T : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/ModelProperty.d.ts:3
Type parameters
ModelServiceDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/service/ModelService.d.ts:18
Type parameters
ModelServiceDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/service/ModelService.d.ts:19
Type parameters
ModelServiceFlags
ModelServiceFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/service/ModelService.d.ts:9
ModelServiceMemberType
Model
ServiceMemberType<M, K>: M [ K ] extends ModelService < any , infer T> ? T : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/service/ModelService.d.ts:8
Type parameters
ModelTraitDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelTrait.d.ts:21
Type parameters
ModelTraitFlags
ModelTraitFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelTrait.d.ts:6
ModelTraitMemberInit
Model
TraitMemberInit<M, K>: M [ K ] extends ModelTrait < any , infer S, infer U> ? S | U : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelTrait.d.ts:5
Type parameters
ModelTraitMemberType
Model
TraitMemberType<M, K>: M [ K ] extends ModelTrait < any , infer S, any > ? S : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/ModelTrait.d.ts:4
Type parameters
ModelValueDownlinkDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelValueDownlink.d.ts:10
Type parameters
ModelValueDownlinkDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/downlink/ModelValueDownlink.d.ts:11
Type parameters
TraitConsumer
TraitConsumer<R>: unknown
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/TraitConsumer.d.ts:5
Type parameters
TraitConsumerType
TraitConsumerType<R>: R extends { traitConsumers: ReadonlyArray < infer RC> } ? RC : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/TraitConsumer.d.ts:2
Type parameters
TraitContextType
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/Trait.d.ts:17
Type parameters
TraitFastenerDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitFastener.d.ts:21
Type parameters
TraitFastenerFlags
TraitFastenerFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitFastener.d.ts:6
TraitFastenerMemberInit
Trait
FastenerMemberInit<R, K>: R [ K ] extends TraitFastener < any , infer S, infer U> ? S | U : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitFastener.d.ts:5
Type parameters
TraitFastenerMemberType
Trait
FastenerMemberType<R, K>: R [ K ] extends TraitFastener < any , infer S, any > ? S : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitFastener.d.ts:4
Type parameters
TraitFlags
TraitFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/Trait.d.ts:18
TraitModelDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitModel.d.ts:21
Type parameters
TraitModelFlags
TraitModelFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitModel.d.ts:6
TraitModelMemberInit
Trait
ModelMemberInit<R, K>: R [ K ] extends TraitModel < any , infer S, infer U> ? S | U : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitModel.d.ts:5
Type parameters
TraitModelMemberType
Trait
ModelMemberType<R, K>: R [ K ] extends TraitModel < any , infer S, any > ? S : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/fastener/TraitModel.d.ts:4
Type parameters
TraitModelType
Trait
ModelType<R>: R extends { model: infer M } ? M extends null ? never : M : Model
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/Trait.d.ts:14
Type parameters
TraitObserverType
TraitObserverType<R>: R extends { traitObservers: ReadonlyArray < infer RO> } ? RO : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/TraitObserver.d.ts:3
Type parameters
TraitPropertyDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:24
Type parameters
TraitPropertyDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:25
Type parameters
TraitPropertyDescriptorFromAny
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:28
Type parameters
TraitPropertyFlags
TraitPropertyFlags: number
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:10
TraitPropertyMemberInit
Trait
PropertyMemberInit<R, K>: R [ K ] extends TraitProperty < any , infer T, infer U> ? T | U : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:5
Type parameters
TraitPropertyMemberKey
Trait
PropertyMemberKey<R, K>: R [ K ] extends TraitProperty < any , any > ? K : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:6
Type parameters
TraitPropertyMemberMap
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:7
Type parameters
TraitPropertyMemberType
Trait
PropertyMemberType<R, K>: R [ K ] extends TraitProperty < any , infer T, any > ? T : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/property/TraitProperty.d.ts:4
Type parameters
TraitServiceDescriptor
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/service/TraitService.d.ts:18
Type parameters
TraitServiceDescriptorExtends
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/service/TraitService.d.ts:19
Type parameters
TraitServiceMemberType
Trait
ServiceMemberType<R, K>: R [ K ] extends TraitService < any , infer T> ? T : never
Defined in swim-toolkit-js/swim-ui-js/@swim/model/lib/main/service/TraitService.d.ts:6
Type parameters
@swim/model
@swim/model implements a lifecycle-managed model hierarchy supporting dynamic scoping and service injection. @swim/model is part of the @swim/ui framework.
Installation
npm
For an npm-managed project,
npm install @swim/model
to make it a dependency. TypeScript sources will be installed intonode_modules/@swim/model/main
. Transpiled JavaScript and TypeScript definition files install intonode_modules/@swim/model/lib/main
. And a pre-built UMD script can be found innode_modules/@swim/model/dist/main/swim-model.js
.Browser
Browser applications can load
swim-ui.js
—which bundles the @swim/model library—along with itsswim-core.js
andswim-mesh.js
dependencies, directly from the SwimOS CDN.Alternatively, the
swim-toolkit.js
script may be loaded, along with itsswim-system.js
dependency, from the SwimOS CDN. Theswim-toolkit.js
script bundles @swim/model together with all other @swim/toolkit frameworks.Usage
ES6/TypeScript
@swim/model can be imported as an ES6 module from TypeScript and other ES6-compatible environments.
CommonJS/Node.js
@swim/model can also be used as a CommonJS module in Node.js applications.
Browser
When loaded by a web browser, the
swim-ui.js
script adds all @swim/model library exports to the globalswim
namespace. Theswim-ui.js
script requires thatswim-core.js
andswim-mesh.js
have already been loaded.The
swim-toolkit.js
script also adds all @swim/model library exports to the globalswim
namespace, making it a drop-in replacement forswim-ui.js
andswim-model.js
when additional @swim/toolkit frameworks are needed.