Function registerUsable

  • Register with the usable system. This is only needed for for the @use decorator, as use(this, Helper) is a concise wrapper around the helper-manager system.

    The return type must be a "Cache" returned from invokeHelper so that @use's usage of getValue gets the value (as determined by the helper manager you wrote for your usable).

    Type Parameters

    • Usable extends UsableConfig

    Parameters

    • type: string

      The key to register the usable under.

      All usables must have a type.

      Any usable matching the registered type will used the passed function to create its Cache -- this is typically the return result of invokeHelper,

      Any usables must have a type property matching this string

    • useFn: UsableFn<Usable>

      Receives the the parent context and object passed to the @use decorator.

    Returns void

Generated using TypeDoc