prostub 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2 -14
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -79,13 +79,7 @@ declare function spy<const TObject extends object>(realObject: TObject): TObject
|
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
-
declare function stub<const TObject extends object>(mockOrSpy: TObject
|
|
83
|
-
[mock$1]: {
|
|
84
|
-
stubs: {
|
|
85
|
-
-readonly [TKey in keyof TObject]?: Stub<TObject, TKey>;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
}): Stubbable<TObject>;
|
|
82
|
+
declare function stub<const TObject extends object>(mockOrSpy: Mock<TObject>): Stubbable<TObject>;
|
|
89
83
|
|
|
90
84
|
declare function answer<const TObject extends object, const TKey extends keyof TObject, const TArgs extends Array<unknown>, const TReturn>(answerFunction: (this: TObject, ...args: TArgs) => TReturn): FunctionStub<TObject, TKey, TArgs, TReturn>;
|
|
91
85
|
|
|
@@ -199,13 +193,7 @@ type Verifiable<T> = {
|
|
|
199
193
|
readonly [TKey in keyof T]: T[TKey] extends (...args: infer TArgs) => infer TReturn ? FunctionVerification<TArgs, TReturn> : PropertyVerification<T[TKey]>;
|
|
200
194
|
};
|
|
201
195
|
|
|
202
|
-
declare function verify<const TObject extends object>(mockOrSpy: TObject
|
|
203
|
-
[mock$1]: {
|
|
204
|
-
stubs: {
|
|
205
|
-
-readonly [TKey in keyof TObject]?: Stub<TObject, TKey>;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
}): Verifiable<TObject>;
|
|
196
|
+
declare function verify<const TObject extends object>(mockOrSpy: Mock<TObject>): Verifiable<TObject>;
|
|
209
197
|
|
|
210
198
|
export { answer, callThrough, defaultValue, delegateTo, fixedValue, mock, noop, returnFixed, returnSerial, spy, stub, throwOnCall, trackValue, verify, when };
|
|
211
199
|
export type { Mock };
|