Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

class-autobind-decorator

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-autobind-decorator - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

28

build/index.d.ts

@@ -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;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc