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.
@@ -1,4 +1,6 @@
1
1
  import { AnyFunction } from '../function';
2
2
  import { RecursivePartial } from '../object';
3
- export declare type Stub<T> = T extends AnyFunction ? T : RecursivePartial<T>;
4
- export declare function stub<T>(stub?: Stub<T>): T;
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;
@@ -1 +1 @@
1
- {"version":3,"file":"stub.js","sourceRoot":"","sources":["../../ts/testing/stub.ts"],"names":[],"mappings":";;;AAKA,SAAgB,IAAI,CAAI,IAAc;IACpC,OAAO,IAAS,CAAA;AAClB,CAAC;AAFD,oBAEC"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"stub.js","sourceRoot":"","sources":["../../ts/testing/stub.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,IAAI,CAAI,IAAc;IACpC,OAAO,IAAS,CAAA;AAClB,CAAC"}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "type-plus",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
4
4
  "description": "Provides additional types for TypeScript.",
5
5
  "homepage": "https://github.com/unional/type-plus",
6
6
  "bugs": {
@@ -1,8 +1,10 @@
1
1
  import { AnyFunction } from '../function'
2
2
  import { RecursivePartial } from '../object'
3
3
 
4
- export type Stub<T> = T extends AnyFunction ? T : RecursivePartial<T>
4
+ export namespace stub {
5
+ export type Param<T> = T extends AnyFunction ? T : RecursivePartial<T>
6
+ }
5
7
 
6
- export function stub<T>(stub?: Stub<T>) {
8
+ export function stub<T>(stub?: stub.Param<T>) {
7
9
  return stub as T
8
10
  }