+1
-1
| { | ||
| "name": "tapable", | ||
| "version": "2.2.3", | ||
| "version": "2.3.0", | ||
| "description": "Just a little module for plugins.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/webpack/tapable", |
+13
-3
@@ -144,6 +144,6 @@ type FixedSizeArray<T extends number, U> = T extends 0 | ||
| type HookFactory<H> = (key: any, hook?: H) => H; | ||
| type HookFactory<H, K = any> = (key: K) => H; | ||
| interface HookMapInterceptor<H> { | ||
| factory?: HookFactory<H>; | ||
| interface HookMapInterceptor<H, K = any> { | ||
| factory?: (key: K, hook: H) => H; | ||
| } | ||
@@ -159,2 +159,12 @@ | ||
| type AnyHook = Hook<any, any>; | ||
| export class TypedHookMap<M extends Record<any, AnyHook>> { | ||
| constructor(factory: HookFactory<M[keyof M], keyof M>, name?: string); | ||
| name: string | undefined; | ||
| get<K extends keyof M>(key: K): M[K] | undefined; | ||
| for<K extends keyof M>(key: K): M[K]; | ||
| intercept(interceptor: HookMapInterceptor<M[keyof M], keyof M>): void; | ||
| } | ||
| export class MultiHook<H> { | ||
@@ -161,0 +171,0 @@ constructor(hooks: H[], name?: string); |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
48430
0.77%1302
0.62%