Socket
Socket
Sign inDemoInstall

@tapjs/intercept

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/intercept - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

10

dist/commonjs/index.d.ts

@@ -22,3 +22,3 @@ import { TapPlugin, TestBase } from '@tapjs/core';

args: OverloadParams<F>;
receiver: any;
receiver: Receiver<F>;
at?: CallSiteLike;

@@ -125,2 +125,6 @@ stack?: string;

/**
* Infer the `this` target of a function
*/
export type Receiver<F> = F extends (this: infer T, ...a: any[]) => any ? T : never;
/**
* The method returned by {@link @tapjs/intercept!Interceptor#capture},

@@ -210,3 +214,3 @@ * which returns the {@link @tapjs/intercept!CaptureResult} array when

*/
capture<T extends {}, M extends Methods<T>>(obj: T, method: M, impl?: (...a: any[]) => any): CaptureResultsMethod<T, M>;
capture<T extends {}, M extends Methods<T>>(obj: T, method: M, impl?: (this: T, ...a: any[]) => any): CaptureResultsMethod<T, M>;
/**

@@ -222,3 +226,3 @@ * Just wrap the function and return it. Does not have any

*/
captureFn<F extends (this: any, ...a: any[]) => any>(original: F): ((...a: any[]) => any) & {
captureFn<F extends (this: any, ...a: any[]) => any>(original: F): F & {
calls: CaptureResult<F>[];

@@ -225,0 +229,0 @@ args: () => OverloadParams<F>[];

@@ -22,3 +22,3 @@ import { TapPlugin, TestBase } from '@tapjs/core';

args: OverloadParams<F>;
receiver: any;
receiver: Receiver<F>;
at?: CallSiteLike;

@@ -125,2 +125,6 @@ stack?: string;

/**
* Infer the `this` target of a function
*/
export type Receiver<F> = F extends (this: infer T, ...a: any[]) => any ? T : never;
/**
* The method returned by {@link @tapjs/intercept!Interceptor#capture},

@@ -210,3 +214,3 @@ * which returns the {@link @tapjs/intercept!CaptureResult} array when

*/
capture<T extends {}, M extends Methods<T>>(obj: T, method: M, impl?: (...a: any[]) => any): CaptureResultsMethod<T, M>;
capture<T extends {}, M extends Methods<T>>(obj: T, method: M, impl?: (this: T, ...a: any[]) => any): CaptureResultsMethod<T, M>;
/**

@@ -222,3 +226,3 @@ * Just wrap the function and return it. Does not have any

*/
captureFn<F extends (this: any, ...a: any[]) => any>(original: F): ((...a: any[]) => any) & {
captureFn<F extends (this: any, ...a: any[]) => any>(original: F): F & {
calls: CaptureResult<F>[];

@@ -225,0 +229,0 @@ args: () => OverloadParams<F>[];

{
"name": "@tapjs/intercept",
"version": "1.1.0",
"version": "1.1.1",
"description": "a built-in tap extension for t.intercept() and t.capture()",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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