Component definition setup.

It is passed to setup method to set up the bootstrap. E.g. by providing definition or component context values.

Type Parameters

  • T extends object = any

Hierarchy

  • DefinitionSetup

Properties

componentType: ComponentClass<T>

Component class constructor.

whenComponent: OnEvent<[ComponentContext<T>]>

An OnEvent sender of component context upon its instantiation.

If component instantiated after the receiver is registered, that receiver would receive an instantiated component's context immediately.

If component already exists when the receiver is registered, that receiver would receive instantiated component's context only when/if component is connected. This is to prevent resource leaking on disconnected components that may be never used again.

whenReady: OnEvent<[DefinitionContext<T>]>

An OnEvent sender of component definition context upon its readiness.

The custom element class is not constructed until component definition is complete. The registered receiver will be notified when the custom element class is constructed.

If the custom element class is constructed already, the receiver will be notified immediately.

Methods

  • Provides asset for entry available in contexts of each component of the defined component type.

    Returns

    Asset supply. Revokes provided asset once cut off.

    Type Parameters

    • TValue

      Context value type.

    • TAsset = TValue

      Context value asset type.

    Parameters

    Returns Supply

  • Provides asset for component definition context entry.

    Returns

    Asset supply. Revokes provided asset once cut off.

    Type Parameters

    • TValue

      Context value type.

    • TAsset = TValue

      Context value asset type.

    Parameters

    Returns Supply

Generated using TypeDoc