@esportsplus/typescript 0.0.11 → 0.0.12

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/build/types.d.ts CHANGED
@@ -3,4 +3,5 @@ type NeverAsync<T> = T extends Promise<unknown> ? never : T extends (...args: un
3
3
  type Prettify<T> = {
4
4
  [K in keyof T]: T[K];
5
5
  } & {};
6
- export { Function, NeverAsync, Prettify };
6
+ type Primitive<T> = T extends Promise<unknown> ? never : T extends (...args: unknown[]) => unknown ? never : T;
7
+ export { Function, NeverAsync, Prettify, Primitive };
package/package.json CHANGED
@@ -22,5 +22,5 @@
22
22
  "prepublishOnly": "npm run build"
23
23
  },
24
24
  "types": "build/index.d.ts",
25
- "version": "0.0.11"
25
+ "version": "0.0.12"
26
26
  }
package/src/types.ts CHANGED
@@ -13,5 +13,12 @@ type Prettify<T> = {
13
13
  [K in keyof T]: T[K];
14
14
  } & {};
15
15
 
16
+ type Primitive<T> =
17
+ T extends Promise<unknown>
18
+ ? never
19
+ : T extends (...args: unknown[]) => unknown
20
+ ? never
21
+ : T;
22
+
16
23
 
17
- export { Function, NeverAsync, Prettify };
24
+ export { Function, NeverAsync, Prettify, Primitive };