// Type definitions for lodash-decorators 3.0 // Project: https://github.com/steelsojka/lodash-decorators // Definitions by: Alan Agius , Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 /// declare module "lodash-decorators" { // Originally copied from ../node_modules/typescript/lib/lib.es6.d.ts type ClassDecorator = (target: TFunction) => TFunction | void; type PropertyDecorator = (target: object, propertyKey: string | symbol) => void; type MethodDecorator = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; type ParameterDecorator = (target: object, propertyKey: string | symbol, parameterIndex: number) => void; type TypedMethodDecorator = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; interface MethodDecoratorWithAccessor extends MethodDecorator, Accessor { } interface Accessor { set: T; get: T; proto: T; } type DebounceDecorator = (wait: number, options?: _.DebounceSettings) => MethodDecorator; type ThrottleDecorator = (wait: number, options?: _.ThrottleSettings) => MethodDecorator; type MemoizeDecorator = (resolver?: Function) => MethodDecorator; type AfterDecorator = (n: number) => MethodDecorator; type BeforeDecorator = (n: number) => MethodDecorator; type AryDecorator = (n: number) => MethodDecorator; type CurryDecorator = (arity?: number) => MethodDecorator; type CurryRightDecorator = (arity?: number) => MethodDecorator; type RestDecorator = (start?: number) => MethodDecorator; type OverArgsDecorator = (func: Function, ...transforms: Function[]) => MethodDecorator; type PartialDecorator = (func: Function | string, ...args: any[]) => MethodDecorator; type WrapDecorator = (wrapper: ((func: Function, ...args: any[]) => any) | string) => MethodDecorator; type ComposeDecorator = (...funcs: Array<(Function | string)>) => MethodDecorator; type DelayDecorator = (wait: number, ...args: any[]) => MethodDecorator; type DeferDecorator = (...args: any[]) => MethodDecorator; interface BindDecorator { (): TypedMethodDecorator<(() => R)>; (param1?: T1): TypedMethodDecorator<((param1: T1) => R)>; (param1?: T1, param2?: T2): TypedMethodDecorator<((param1: T1, param2: T2) => R)>; (param1?: T1, param2?: T2, param3?: T3): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3) => R)>; (param1?: T1, param2?: T2, param3?: T3, param4?: T4): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3, param4: T4) => R)>; (param1?: T1, param2?: T2, param3?: T3, param4?: T4, param5?: T5): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => R)>; (param1?: T1, param2?: T2, param3?: T3, param4?: T4, param5?: T5, param6?: T6): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3, param4: T4, param5: T5, param6: T6) => R)>; } type BindAllDecorator = (...methodNames: string[]) => ClassDecorator; const debounce: DebounceDecorator & Accessor; const Debounce: DebounceDecorator & Accessor; const throttle: ThrottleDecorator & Accessor; const Throttle: ThrottleDecorator & Accessor; const memoize: MemoizeDecorator & Accessor; const Memoize: MemoizeDecorator & Accessor; const after: AfterDecorator & Accessor; const After: AfterDecorator & Accessor; const before: BeforeDecorator & Accessor; const Before: BeforeDecorator & Accessor; const ary: AryDecorator & Accessor; const Ary: AryDecorator & Accessor; const curry: CurryDecorator & Accessor; const Curry: CurryDecorator & Accessor; const curryRight: CurryRightDecorator & Accessor; const CurryRight: CurryRightDecorator & Accessor; const overArgs: OverArgsDecorator & Accessor; const OverArgs: OverArgsDecorator & Accessor; const rest: RestDecorator & Accessor; const Rest: RestDecorator & Accessor; const partial: PartialDecorator & Accessor; const Partial: PartialDecorator & Accessor; const partialRight: PartialDecorator & Accessor; const PartialRight: PartialDecorator & Accessor; const wrap: WrapDecorator & Accessor; const Wrap: WrapDecorator & Accessor; const flow: ComposeDecorator & Accessor; const Flow: ComposeDecorator & Accessor; const flowRight: ComposeDecorator & Accessor; const FlowRight: ComposeDecorator & Accessor; const delay: DelayDecorator & Accessor; const Delay: DelayDecorator & Accessor; const defer: DeferDecorator & Accessor; const Defer: DeferDecorator & Accessor; const bind: BindDecorator & Accessor; const Bind: BindDecorator & Accessor; const bindAll: BindAllDecorator; const BindAll: BindAllDecorator; const once: MethodDecoratorWithAccessor; const Once: MethodDecoratorWithAccessor; const attempt: MethodDecoratorWithAccessor; const Attempt: MethodDecoratorWithAccessor; const spread: MethodDecoratorWithAccessor; const Spread: MethodDecoratorWithAccessor; const rearg: MethodDecoratorWithAccessor; const Rearg: MethodDecoratorWithAccessor; const negate: MethodDecoratorWithAccessor; const Negate: MethodDecoratorWithAccessor; const tap: MethodDecoratorWithAccessor; const Tap: MethodDecoratorWithAccessor; const flip: MethodDecoratorWithAccessor; const Flip: MethodDecoratorWithAccessor; } declare module "lodash-decorators/extensions" { // Originally copied from ../node_modules/typescript/lib/lib.es6.d.ts type ClassDecorator = (target: TFunction) => TFunction | void; type PropertyDecorator = (target: object, propertyKey: string | symbol) => void; type MethodDecorator = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; type ParameterDecorator = (target: object, propertyKey: string | symbol, parameterIndex: number) => void; interface DeprecatedDecorator extends MethodDecorator, ClassDecorator { methodAction(fn: Function & { name: string }): void; } const deprecated: DeprecatedDecorator; const Deprecated: DeprecatedDecorator; function writable(writable?: boolean): MethodDecorator; function Writable(writable?: boolean): MethodDecorator; function configurable(configurable?: boolean): MethodDecorator; function Configurable(configurable?: boolean): MethodDecorator; function returnsArg(index?: number): MethodDecorator; function ReturnsArg(index?: number): MethodDecorator; function enumerable(enumerable?: boolean): MethodDecorator; function Enumerable(enumerable?: boolean): MethodDecorator; const nonenumerable: MethodDecorator; const Nonenumerable: MethodDecorator; const nonconfigurable: MethodDecorator; const Nonconfigurable: MethodDecorator; const readonly: MethodDecorator; const Readonly: MethodDecorator; } declare module "lodash-decorators/validate" { // Originally copied from ../node_modules/typescript/lib/lib.es6.d.ts type ClassDecorator = (target: TFunction) => TFunction | void; type PropertyDecorator = (target: object, propertyKey: string | symbol) => void; type MethodDecorator = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; type ParameterDecorator = (target: object, propertyKey: string | symbol, parameterIndex: number) => void; type TypedMethodDecorator = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; type Predicate = (t: T) => boolean; type Predicates = Predicate | Array>; interface ValidateDecorator { (p1: Predicates): TypedMethodDecorator<((param1: T1) => R)>; (p1: Predicates, p2?: Predicates): TypedMethodDecorator<((param1: T1, param2: T2) => R)>; (p1: Predicates, p2?: Predicates, p3?: Predicates): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3) => R)>; (p1: Predicates, p2?: Predicates, p3?: Predicates, p4?: Predicates): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3, param4: T4) => R)>; (p1: Predicates, p2?: Predicates, p3?: Predicates, p4?: Predicates, p5?: Predicates): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => R)>; (p1: Predicates, p2?: Predicates, p3?: Predicates, p4?: Predicates, p5?: Predicates, p6?: Predicates): TypedMethodDecorator<((param1: T1, param2: T2, param3: T3, param4: T4, param5: T5, param6: T6) => R)>; } type ValidateReturnDecorator = (p1: Predicates) => TypedMethodDecorator<((...args: any[]) => R)>; const validate: ValidateDecorator; const Validate: ValidateDecorator; const validateReturn: ValidateReturnDecorator; const ValidateReturn: ValidateReturnDecorator; }