Class Shareable<TBody, TSharer>

Abstract implementation of value shareable by component.

Shareable instance contains a body that become usable only when bound to sharer component.

Type Parameters

  • TBody = unknown

    Shareable body type.

  • TSharer extends object = any

    Sharer component type.

Hierarchy

  • Shareable

Implements

Constructors

Properties

[Shareable$Internals__symbol]: Shareable$Internals<TBody, TSharer>

Accessors

  • get read(): AfterEvent<[TBody]>
  • An AfterEvent keeper of shareable body.

    An [AfterEvent__symbol] method always returns this value.

    Returns AfterEvent<[TBody]>

  • get sharer(): ComponentContext<TSharer>
  • Sharer component context.

    Accessing it throws an exception until bound to sharer.

    Returns ComponentContext<TSharer>

Methods

  • Converts shareable body or its provider to provider that always returns an AfterEvent keeper of shareable body.

    Returns

    Shareable body provider.

    Type Parameters

    • TBody = unknown

      Shareable body type.

    • TSharer extends object = any

      Sharer component type.

    Parameters

    • body: TBody | Shareable.Provider<TBody, TSharer>

      Either shareable body, or its provider.

    Returns ((this: void, sharer: ComponentContext<TSharer>) => AfterEvent<[TBody]>)

      • (this: void, sharer: ComponentContext<TSharer>): AfterEvent<[TBody]>
      • Converts shareable body or its provider to provider that always returns an AfterEvent keeper of shareable body.

        Returns

        Shareable body provider.

        Parameters

        • this: void
        • sharer: ComponentContext<TSharer>

        Returns AfterEvent<[TBody]>

Generated using TypeDoc