class-autobind-decorator
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -1,9 +0,25 @@ | ||
export default autoBindMethods; | ||
declare namespace autoBindMethodsFactory { | ||
// All types exported to make things easier for consumers of this decorator. | ||
export type ConstructorFunction<T> = { | ||
new(...args: any[]): T; | ||
}; | ||
interface InputOptions { | ||
methodsToIgnore?: Array<string>; | ||
dontOptimize?: boolean | ||
export interface InputOptions { | ||
methodsToIgnore?: Array<string>; | ||
dontOptimize?: boolean | ||
} | ||
export interface autoBindMethodsDecorator<T> { | ||
(constructor: ConstructorFunction<T>, options?: InputOptions): void; | ||
} | ||
} | ||
declare function autoBindMethods(input: Function): void; | ||
declare function autoBindMethods(input?: InputOptions): (target: Function) => void; | ||
declare function autoBindMethodsFactory<T>( | ||
input: autoBindMethodsFactory.ConstructorFunction<T> | ||
): void; | ||
declare function autoBindMethodsFactory<T>( | ||
input?: autoBindMethodsFactory.InputOptions | ||
): autoBindMethodsFactory.autoBindMethodsDecorator<T>; | ||
export default autoBindMethodsFactory; |
# CHANGELOG | ||
## v2.3.0 (8/4/2017) | ||
- Improve typings (and types exposed for consumption) | ||
## v2.2.1 (1/27/2017) | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "class-autobind-decorator", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "A small framework-agnostic utility for auto-binding \"class\" methods to instances (with customization options) using either \"legacy\" decorator syntax or plain old ES5 (without needing ES2015+ polyfills).", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -1,9 +0,25 @@ | ||
export default autoBindMethods; | ||
declare namespace autoBindMethodsFactory { | ||
// All types exported to make things easier for consumers of this decorator. | ||
export type ConstructorFunction<T> = { | ||
new(...args: any[]): T; | ||
}; | ||
interface InputOptions { | ||
methodsToIgnore?: Array<string>; | ||
dontOptimize?: boolean | ||
export interface InputOptions { | ||
methodsToIgnore?: Array<string>; | ||
dontOptimize?: boolean | ||
} | ||
export interface autoBindMethodsDecorator<T> { | ||
(constructor: ConstructorFunction<T>, options?: InputOptions): void; | ||
} | ||
} | ||
declare function autoBindMethods(input: Function): void; | ||
declare function autoBindMethods(input?: InputOptions): (target: Function) => void; | ||
declare function autoBindMethodsFactory<T>( | ||
input: autoBindMethodsFactory.ConstructorFunction<T> | ||
): void; | ||
declare function autoBindMethodsFactory<T>( | ||
input?: autoBindMethodsFactory.InputOptions | ||
): autoBindMethodsFactory.autoBindMethodsDecorator<T>; | ||
export default autoBindMethodsFactory; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27302
382