type-plus 4.4.1 → 4.4.2
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/cjs/testing/stub.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { AnyFunction } from '../function';
|
|
2
2
|
import { RecursivePartial } from '../object';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
3
|
+
export declare namespace stub {
|
|
4
|
+
type Param<T> = T extends AnyFunction ? T : RecursivePartial<T>;
|
|
5
|
+
}
|
|
6
|
+
export declare function stub<T>(stub?: stub.Param<T>): T;
|
package/cjs/testing/stub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stub.js","sourceRoot":"","sources":["../../ts/testing/stub.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"stub.js","sourceRoot":"","sources":["../../ts/testing/stub.ts"],"names":[],"mappings":";;;AAOA,SAAgB,IAAI,CAAI,IAAoB;IAC1C,OAAO,IAAS,CAAA;AAClB,CAAC;AAFD,oBAEC"}
|
package/esm/testing/stub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stub.js","sourceRoot":"","sources":["../../ts/testing/stub.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stub.js","sourceRoot":"","sources":["../../ts/testing/stub.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,IAAI,CAAI,IAAoB;IAC1C,OAAO,IAAS,CAAA;AAClB,CAAC"}
|
package/package.json
CHANGED
package/ts/testing/stub.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { AnyFunction } from '../function'
|
|
2
2
|
import { RecursivePartial } from '../object'
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export namespace stub {
|
|
5
|
+
export type Param<T> = T extends AnyFunction ? T : RecursivePartial<T>
|
|
6
|
+
}
|
|
5
7
|
|
|
6
|
-
export function stub<T>(stub?:
|
|
8
|
+
export function stub<T>(stub?: stub.Param<T>) {
|
|
7
9
|
return stub as T
|
|
8
10
|
}
|