Socket
Socket
Sign inDemoInstall

@types/tapable

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/tapable - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

57

tapable/index.d.ts

@@ -240,13 +240,44 @@ // Type definitions for tapable v1.0.0

export interface Tap {
type TapFunction<T extends TapType = TapType, TArg1 = any, TArg2 = any, TArg3 = any, TResult = any> =
T extends "sync" ? (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => TResult :
T extends "async" ? (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => void :
T extends "promise" ? (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => Promise<TResult> :
never;
export interface Tap<TTapType extends TapType = TapType, TArg1 = any, TArg2 = any, TArg3 = any, THookResult = any> {
name: string;
type: TapType;
fn: Function;
stage: number;
context: boolean;
type: TTapType;
fn: TapFunction<TTapType, TArg1, TArg2, TArg3, THookResult>;
stage?: number;
context?: boolean;
before?: string | string[];
}
export type TapOptions<TTapType extends TapType = TapType, TArg1 = any, TArg2 = any, TArg3 = any, THookResult = any> = {
name: string;
stage?: number;
context?: boolean;
before?: string | string[];
} & (
TTapType extends "sync" ? {
type?: "sync";
fn?: TapFunction<"sync", TArg1, TArg2, TArg3, THookResult>;
} :
TTapType extends "async" ? {
type?: "async";
fn?: TapFunction<"async", TArg1, TArg2, TArg3, THookResult>;
} :
TTapType extends "promise" ? {
type?: "promise";
fn?: TapFunction<"promise", TArg1, TArg2, TArg3, THookResult>;
} :
{
type?: TTapType;
fn?: TapFunction<TTapType, TArg1, TArg2, TArg3, THookResult>;
}
);
export class Hook<TArg1 = any, TArg2 = any, TArg3 = any, TTabResult = any, THookResult = any> {
constructor(tapArgumentNames?: string[]);
taps: any[];
taps: Tap<TapType, TArg1, TArg2, TArg3, THookResult>[];
interceptors: HookInterceptor[];

@@ -259,6 +290,6 @@

compile(options: HookCompileOptions): Function;
tap: (name: string | Tap, fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => TTabResult) => void;
tapAsync: (name: string | Tap, fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => void) => void;
tapPromise: (name: string | Tap, fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => Promise<TTabResult>) => void;
compile: (options: HookCompileOptions) => Function;
tap: (name: string | TapOptions<"sync", TArg1, TArg2, TArg3, TTabResult>, fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => TTabResult) => void;
tapAsync: (name: string | TapOptions<"async", TArg1, TArg2, TArg3, TTabResult>, fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => void) => void;
tapPromise: (name: string | TapOptions<"promise", TArg1, TArg2, TArg3, TTabResult>, fn: (arg1: TArg1, arg2: TArg2, arg3: TArg3, ...args: any[]) => Promise<TTabResult>) => void;
intercept: (interceptor: HookInterceptor) => void;

@@ -291,5 +322,5 @@ }

for: (key: any) => Hook<T1, T2, T3>;
tap: (key: any, name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => any) => void;
tapAsync: (key: any, name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => void) => void;
tapPromise: (key: any, name: string | Tap, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => Promise<any>) => void;
tap: (key: any, name: string | TapOptions<"sync", T1, T2, T3>, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => any) => void;
tapAsync: (key: any, name: string | TapOptions<"async", T1, T2, T3>, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => void) => void;
tapPromise: (key: any, name: string | TapOptions<"promise", T1, T2, T3>, fn: (arg1: T1, arg2: T2, arg3: T3, ...args: any[]) => Promise<any>) => void;
intercept: (interceptor: HookMapInterceptor<T1, T2, T3>) => void;

@@ -296,0 +327,0 @@ }

{
"name": "@types/tapable",
"version": "1.0.5",
"version": "1.0.6",
"description": "TypeScript definitions for tapable",

@@ -27,4 +27,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "b1629823e4f9420c763f28865125c1765bede047e7e826e3e8b126ef5e6a1b65",
"typeScriptVersion": "2.8"
"typesPublisherContentHash": "788018beac10366820eb56bbd9d711b5e26e353300932f7c925a8d87eadaee46",
"typeScriptVersion": "3.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Sat, 11 Jan 2020 23:19:09 GMT
* Last updated: Tue, 16 Jun 2020 20:54:22 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by e-cloud (https://github.com/e-cloud), and John Reilly (https://github.com/johnnyreilly).
These definitions were written by [e-cloud](https://github.com/e-cloud), and [John Reilly](https://github.com/johnnyreilly).

Sorry, the diff of this file is not supported yet

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