Uneventful
    Preparing search index...

    Type Alias GenericMethodDecorator<F>

    GenericMethodDecorator: {
        (fn: F, ctx?: { kind: "method" }): F;
        (proto: object, name: string | symbol, desc?: { value?: F }): void;
    }

    A decorator function that supports both TC39 and "legacy" decorator protocols

    Type Parameters

    • F extends AnyFunction

      the type of method this decorator can decorate. If the method doesn't conform to this type, compile-time type checks will fail.

    Type Declaration

      • (fn: F, ctx?: { kind: "method" }): F
      • TC39 Method Decorator

        Parameters

        • fn: F
        • Optionalctx: { kind: "method" }

        Returns F

      • (proto: object, name: string | symbol, desc?: { value?: F }): void
      • Legacy Method Decorator

        Parameters

        • proto: object
        • name: string | symbol
        • Optionaldesc: { value?: F }

        Returns void