turbodombuilder - v0.9.5
    Preparing search index...

    Function callOncePerInstance

    • Type Parameters

      • Type extends object

      Parameters

      • value: (this: Type, ...args: any[]) => any
      • context: ClassMethodDecoratorContext<Type>

      Returns any

      Stage-3 method decorator. It ensures a method in a class is called only once per instance. Subsequent calls will be canceled and log a warning. Works for instance or static methods.

        class A {
      @callOnce init() { ... }
      }