free-types-core 1.0.2 → 1.0.3

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/dist/unwrap.d.ts +1 -1
  2. package/package.json +1 -1
package/dist/unwrap.d.ts CHANGED
@@ -23,7 +23,7 @@ declare global {
23
23
  }
24
24
  export { unwrap, Unwrapped, Search };
25
25
  /** Decompose a type into its constituents */
26
- type unwrap<T, From extends Search = Omit<TypesMap, ArrayURIs>> = IsAny<T> extends true ? Any : (T extends readonly unknown[] ? From extends _Type | _Type[] ? null : unwrapLists<T> : null) extends infer R extends Unwrapped ? R : _unwrap<T, From extends _Type ? [From] : From>;
26
+ type unwrap<T, From extends Search = TypesMap> = IsAny<T> extends true ? Any : (T extends readonly unknown[] ? From extends _Type | _Type[] ? null : unwrapLists<T> : null) extends infer R extends Unwrapped ? R : _unwrap<T, From extends _Type ? [From] : TypesMap extends From ? Omit<TypesMap, ArrayURIs> : From>;
27
27
  type unwrapLists<T extends readonly unknown[]> = T extends unknown[] ? any[] extends T ? Unwrapped<'Array', Array, [T[0]]> : Unwrapped<'Tuple', Tuple, T> : readonly any[] extends T ? Unwrapped<'ReadonlyArray', ReadonlyArray, [T[0]]> : Unwrapped<'ReadonlyTuple', ReadonlyTuple, Mutable<T>>;
28
28
  type Mutable<T> = {
29
29
  -readonly [K in keyof T]: T[K];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-types-core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A type-level library enabling the creation and the manipulation of type constructors which are detached from their type parameters.",
5
5
  "keywords:": [
6
6
  "higher kinded type",