Trilium Frontend API
    Preparing search index...

    Class TypedComponent<ChildT>

    Abstract class for all components in the Trilium's frontend.

    Contains also event implementation with following properties:

    • event / command distribution is synchronous which among others mean that events are well-ordered - event which was sent out first will also be processed first by the component
    • execution of the event / command is asynchronous - each component executes the event on its own without regard for other components.
    • although the execution is async, we are collecting all the promises, and therefore it is possible to wait until the event / command is executed in all components - by simply awaiting the triggerEvent().

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _position: number
    $widget: any
    children: ChildT[]
    componentId: string
    initialized: Promise<void>
    parent?: TypedComponent<any>

    Accessors

    • get position(): number

      Returns number

    • set position(newPosition: number): void

      Parameters

      • newPosition: number

      Returns void

    • get sanitizedClassName(): string

      Returns string

    Methods

    • Parameters

      • fun: (arg: unknown) => Promise<unknown>
      • data: unknown

      Returns Promise<unknown>

    • Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns Promise<unknown>

    • Type Parameters

      Parameters

      Returns Promise<unknown>

    • Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns Promise<unknown>