Namespace: traits
SelectableChildren Classes
Trait Classes
- BoxModelTrait
- ChildTrait
- Entity
- FlexyTrait
- IdentityTrait
- LabelTrait
- LocationTrait
- OwnershipTrait
- ParentTrait
- TwoSidedTrait
Child Functions
Ownership Functions
Parent Functions
SelectableChildren Functions
Trait Functions
Type Aliases
ChildAddedHandler
Ƭ ChildAddedHandler: (child
: ChildTrait
) => void
Type declaration
▸ (child
): void
Parameters
Name | Type |
---|---|
child | ChildTrait |
Returns
void
ChildRemovedHandler
Ƭ ChildRemovedHandler: (idx
: number
) => void
Type declaration
▸ (idx
): void
Parameters
Name | Type |
---|---|
idx | number |
Returns
void
Child Functions
isChild
▸ isChild(entity
): entity is ChildTrait
Parameters
Name | Type |
---|---|
entity | unknown |
Returns
entity is ChildTrait
Ownership Functions
hasOwnership
▸ hasOwnership(entity
): entity is OwnershipTrait
Parameters
Name | Type |
---|---|
entity | unknown |
Returns
entity is OwnershipTrait
Parent Functions
hasChildren
▸ hasChildren(entity
): boolean
Parameters
Name | Type |
---|---|
entity | unknown |
Returns
boolean
isParent
▸ isParent(entity
): entity is ParentTrait
Parameters
Name | Type |
---|---|
entity | unknown |
Returns
entity is ParentTrait
SelectableChildren Functions
hasSelectableChildren
▸ hasSelectableChildren(entity
): entity is SelectableChildrenTrait
Parameters
Name | Type |
---|---|
entity | unknown |
Returns
entity is SelectableChildrenTrait
Trait Functions
applyTraitsMixins
▸ applyTraitsMixins(baseCtors
): (derivedCtor
: AnyClass
) => void
Mixes all the base constructors prototypes into one. Also provides a way for Entity to automatically execute all of the base constructor's "Trait Constructors".
Parameters
Name | Type |
---|---|
baseCtors | any [] |
Returns
fn
▸ (derivedCtor
): void
Parameters
Name | Type |
---|---|
derivedCtor | AnyClass |
Returns
void
hasIdentity
▸ hasIdentity(entity
): entity is IdentityTrait
Parameters
Name | Type |
---|---|
entity | any |
Returns
entity is IdentityTrait
hasLabel
▸ hasLabel(entity
): entity is LabelTrait
Parameters
Name | Type |
---|---|
entity | unknown |
Returns
entity is LabelTrait