New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fluffy-spoon/substitute

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluffy-spoon/substitute - npm Package Compare versions

Comparing version 1.0.61 to 1.0.62

7

dist/src/Transformations.d.ts

@@ -15,6 +15,9 @@ import { AllArguments } from "./Arguments";

export declare type ObjectSubstitute<T extends Object, K extends Object = T> = ObjectSubstituteTransformation<T> & {
received(amount?: number): K;
didNotReceive(amount?: number): K;
received(amount?: number): TerminatingObject<K>;
didNotReceive(amount?: number): TerminatingObject<K>;
mimick(instance: T): void;
};
declare type TerminatingObject<T> = {
[P in keyof T]: T[P] extends () => infer R ? () => void : T[P] extends (...args: infer F) => infer R ? (...args: F) => void : T[P];
};
declare type ObjectSubstituteTransformation<T extends Object> = {

@@ -21,0 +24,0 @@ [P in keyof T]: T[P] extends () => infer R ? NoArgumentFunctionSubstitute<R> : T[P] extends (...args: infer F) => infer R ? FunctionSubstitute<F, R> : PropertySubstitute<T[P]>;

{
"name": "@fluffy-spoon/substitute",
"version": "1.0.61",
"version": "1.0.62",
"description": "An NSubstitute port to TypeScript called substitute.js.",

@@ -5,0 +5,0 @@ "main": "dist/src/Index.js",

@@ -25,7 +25,14 @@ import { AllArguments } from "./Arguments";

export type ObjectSubstitute<T extends Object, K extends Object = T> = ObjectSubstituteTransformation<T> & {
received(amount?: number): K;
didNotReceive(amount?: number): K;
received(amount?: number): TerminatingObject<K>;
didNotReceive(amount?: number): TerminatingObject<K>;
mimick(instance: T): void;
}
type TerminatingObject<T> = {
[P in keyof T]:
T[P] extends () => infer R ? () => void :
T[P] extends (...args: infer F) => infer R ? (...args: F) => void :
T[P];
}
type ObjectSubstituteTransformation<T extends Object> = {

@@ -32,0 +39,0 @@ [P in keyof T]:

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