UNPKG

@exadel/esl

Version:

Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components

10 lines (9 loc) 618 B
import type { AnyToAnyFnSignature } from '../misc/functions'; /** * Common TS decorator to apply decorator function * (like {@link debounce}, {@link throttle}, {@link rafDecorator}) * to the class method * @param decorator - function decorator, should accept decorated method as first argument * @param args - additional arguments to pass into `decorator` */ export declare function decorate<Args extends any[], Fn extends AnyToAnyFnSignature>(decorator: (fn: Fn, ...params: Args) => Fn, ...args: Args): (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<Fn>) => TypedPropertyDescriptor<Fn>;