ecspresso
    Preparing search index...

    Function directValue

    • Wrap a value to store it as-is, bypassing factory detection. Use when the resource itself is a function or class that should not be invoked.

      Type Parameters

      • T

      Parameters

      • value: T

      Returns ResourceDirectValue<T>

      import { directValue } from 'ecspresso';
      world.addResource('handler', directValue(myFunction));
      world.addResource('MyClass', directValue(MyClass));