inferred-types 0.48.4 → 0.48.6

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.
@@ -6,7 +6,7 @@ import { isTrue, keysOf } from "../index.js";
6
6
  */
7
7
  export const createFnWithProps = (fn, props, narrowing = false) => {
8
8
  const fnWithProps = fn;
9
- for (const prop of keysOf(props)) {
9
+ for (let prop of keysOf(props)) {
10
10
  fnWithProps[prop] = props[prop];
11
11
  }
12
12
  return (isTrue(narrowing)
@@ -1,4 +1,4 @@
1
- import { First, If, IsUnion, Length, Narrowable, UnionToTuple } from "../../types/index";
1
+ import { Flatten, Narrowable } from "../../types/index";
2
2
  /**
3
3
  * **tuple**(value)
4
4
  *
@@ -9,5 +9,5 @@ import { First, If, IsUnion, Length, Narrowable, UnionToTuple } from "../../type
9
9
  * const t2 = tuple([1,2,3]);
10
10
  * ```
11
11
  */
12
- export declare const tuple: <N extends Narrowable, K extends PropertyKey, T extends readonly (Record<K, N> | Narrowable)[]>(...values: T) => import("../../types/index").AsArray<Length<T> extends 1 ? T[0] extends readonly unknown[] ? T[0] extends infer Arr ? If<IsUnion<First<Arr & readonly unknown[]>>, UnionToTuple<First<T[0]>>, T[0]> : T[0] : T[0] : T>;
12
+ export declare const tuple: <N extends Narrowable, K extends PropertyKey, T extends readonly (Record<K, N> | Narrowable)[]>(...values: T) => Flatten<T>;
13
13
  //# sourceMappingURL=tuple.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,0BAAwB;AAGvF;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAChB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,aACrC,CAAC,oHAOW,GAAG,mGAY3B,CAAC"}
1
+ {"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAuB,UAAU,EAAgB,0BAAwB;AAGhG;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAChB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,aACrC,CAAC,KAkBsB,OAAO,CAAC,CAAC,CAC5C,CAAC"}