Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ComponentTrait<C, R, U>

Type parameters

Hierarchy

  • ComponentTrait

Callable

  • ComponentTrait(): null | R
  • ComponentTrait(trait: null | R | U, targetTrait?: null | Trait): C
  • Returns null | R

  • Parameters

    • trait: null | R | U
    • Optional targetTrait: null | Trait

    Returns C

Index

Properties

fastenerFlags

fastenerFlags: number

Readonly key

key: undefined | string

Readonly name

name: string

Optional observe

observe: boolean

Readonly owner

owner: C

Readonly trait

trait: null | R

Optional Readonly type

type: unknown

Methods

attachTrait

  • attachTrait(newTrait: R): void
  • Parameters

    • newTrait: R

    Returns void

createTrait

  • createTrait(): null | R | U
  • Returns null | R | U

detachTrait

  • detachTrait(oldTrait: R): void
  • Parameters

    • oldTrait: R

    Returns void

didMount

  • didMount(): void
  • Returns void

didSetTrait

  • didSetTrait(newTrait: null | R, oldTrait: null | R, targetTrait: null | Trait): void
  • Parameters

    • newTrait: null | R
    • oldTrait: null | R
    • targetTrait: null | Trait

    Returns void

didUnmount

  • didUnmount(): void
  • Returns void

fromAny

  • fromAny(value: R | U): null | R
  • Parameters

    • value: R | U

    Returns null | R

getTrait

  • getTrait(): R
  • Returns R

injectTrait

  • injectTrait(model: Model, trait?: null | R | U, targetTrait?: null | Trait, key?: null | string): null | R
  • Parameters

    • model: Model
    • Optional trait: null | R | U
    • Optional targetTrait: null | Trait
    • Optional key: null | string

    Returns null | R

insertTrait

  • insertTrait(model: Model, trait: R, targetTrait: null | Trait, key: undefined | string): void
  • Parameters

    • model: Model
    • trait: R
    • targetTrait: null | Trait
    • key: undefined | string

    Returns void

isMounted

  • isMounted(): boolean
  • Returns boolean

mount

  • mount(): void
  • Returns void

onMount

  • onMount(): void
  • Returns void

onSetTrait

  • onSetTrait(newTrait: null | R, oldTrait: null | R, targetTrait: null | Trait): void
  • Parameters

    • newTrait: null | R
    • oldTrait: null | R
    • targetTrait: null | Trait

    Returns void

onUnmount

  • onUnmount(): void
  • Returns void

removeTrait

  • removeTrait(): null | R
  • Returns null | R

setFastenerFlags

  • setFastenerFlags(fastenerFlags: number): void
  • Parameters

    • fastenerFlags: number

    Returns void

setTrait

  • setTrait(newTrait: null | R | U, targetTrait?: null | Trait): null | R
  • Parameters

    • newTrait: null | R | U
    • Optional targetTrait: null | Trait

    Returns null | R

unmount

  • unmount(): void
  • Returns void

willMount

  • willMount(): void
  • Returns void

willSetTrait

  • willSetTrait(newTrait: null | R, oldTrait: null | R, targetTrait: null | Trait): void
  • Parameters

    • newTrait: null | R
    • oldTrait: null | R
    • targetTrait: null | Trait

    Returns void

willUnmount

  • willUnmount(): void
  • Returns void

Generated using TypeDoc