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.
Files changed (2) hide show
  1. package/index.d.ts +2 -14
  2. 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prostub",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "A TypeScript library for creating mocks.",
5
5
  "type": "module",
6
6
  "repository": {