Interface TraitModel<R, S, U>
Callable
- TraitModel(): null | S
- TraitModel(model: null | S | U, targetModel?: null | Model): R
-
Returns null | S
-
Parameters
-
model: null | S | U
-
Optional targetModel: null | Model
Returns R
Properties
Optional child
child: boolean
fastenerFlags
fastenerFlags: number
Readonly key
key: undefined | string
Readonly model
model: null | S
Readonly name
name: string
Optional observe
observe: boolean
Readonly owner
owner: R
Readonly parentModel
parent
Model: null | Model
Optional Readonly type
type: unknown
Methods
attachModel
- attachModel(newModel: S): void
-
Parameters
Returns void
createModel
- createModel(): null | S | U
-
Returns null | S | U
detachModel
- detachModel(oldModel: S): void
-
Parameters
Returns void
didMount
-
Returns void
didSetModel
- didSetModel(newModel: null | S, oldModel: null | S, targetModel: null | Model): void
-
Parameters
-
newModel: null | S
-
oldModel: null | S
-
targetModel: null | Model
Returns void
didUnmount
-
Returns void
doSetModel
- doSetModel(newModel: null | S, targetModel: null | Model): void
-
Parameters
-
newModel: null | S
-
targetModel: null | Model
Returns void
fromAny
- fromAny(value: S | U): null | S
-
Parameters
Returns null | S
getModel
-
Returns S
injectModel
- injectModel(parentModel?: null | Model, childModel?: null | S | U, targetModel?: null | Model, key?: null | string): null | S
-
Parameters
-
Optional parentModel: null | Model
-
Optional childModel: null | S | U
-
Optional targetModel: null | Model
-
Optional key: null | string
Returns null | S
insertModel
- insertModel(parentModel: Model, childModel: S, targetModel: null | Model, key: undefined | string): void
-
Parameters
-
parentModel: Model
-
childModel: S
-
targetModel: null | Model
-
key: undefined | string
Returns void
isMounted
-
Returns boolean
mount
-
Returns void
onMount
-
Returns void
onSetModel
- onSetModel(newModel: null | S, oldModel: null | S, targetModel: null | Model): void
-
Parameters
-
newModel: null | S
-
oldModel: null | S
-
targetModel: null | Model
Returns void
onUnmount
-
Returns void
removeModel
-
Returns null | S
setFastenerFlags
- setFastenerFlags(fastenerFlags: number): void
-
Parameters
Returns void
setModel
- setModel(newModel: null | S | U, targetModel?: null | Model): null | S
-
Parameters
-
newModel: null | S | U
-
Optional targetModel: null | Model
Returns null | S
unmount
-
Returns void
willMount
-
Returns void
willSetModel
- willSetModel(newModel: null | S, oldModel: null | S, targetModel: null | Model): void
-
Parameters
-
newModel: null | S
-
oldModel: null | S
-
targetModel: null | Model
Returns void
willUnmount
-
Returns void