inferred-types 0.53.8 → 0.53.10

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.
@@ -15253,11 +15253,11 @@ type TruthyReturns<T extends readonly unknown[]> = TupleToUnion<{
15253
15253
  * Tests whether any of the object in T are explicitly missing
15254
15254
  * the property P
15255
15255
  */
15256
- type HasMissingInstance<T extends readonly Record<string, unknown>[], P extends string> = [] extends T ? false : P extends keyof First<T> ? HasMissingInstance<AfterFirst<T>, P> : true;
15256
+ type HasMissingInstance<T extends readonly AnyObject[], P extends string> = [] extends T ? false : P extends keyof First<T> ? HasMissingInstance<AfterFirst<T>, P> : true;
15257
15257
  /**
15258
15258
  * removes objects that do not have the property P
15259
15259
  */
15260
- type RemoveMissing<T extends readonly Record<string, unknown>[], P extends string, R extends readonly Record<string, unknown>[] = []> = [] extends T ? R[number] : RemoveMissing<AfterFirst<T>, P, P extends keyof First<T> ? [
15260
+ type RemoveMissing<T extends readonly AnyObject[], P extends string, R extends readonly AnyObject[] = []> = [] extends T ? R[number] : RemoveMissing<AfterFirst<T>, P, P extends keyof First<T> ? [
15261
15261
  ...R,
15262
15262
  First<T>
15263
15263
  ] : R>;
@@ -15281,7 +15281,7 @@ type RemoveMissing<T extends readonly Record<string, unknown>[], P extends strin
15281
15281
  * type U = UnionFromProp<typeof data, "id">;
15282
15282
  * ```
15283
15283
  */
15284
- type UnionFromProp<T extends readonly Record<string, unknown>[], P extends string> = HasMissingInstance<T, P> extends true ? Get$1<RemoveMissing<T, P>, P> | undefined : Get$1<T[number], P>;
15284
+ type UnionFromProp<T extends readonly AnyObject[], P extends string> = HasMissingInstance<T, P> extends true ? Get$1<RemoveMissing<T, P>, P> | undefined : Get$1<T[number], P>;
15285
15285
 
15286
15286
  type _Keys$2<T extends object> = UnionToTuple$1<keyof RemoveIndexKeys<T>> extends readonly ObjectKey[] ? UnionToTuple$1<keyof RemoveIndexKeys<T>> : never;
15287
15287
  type ProcessObj$1<T extends Container, TKeys extends readonly PropertyKey[], TResults extends Dictionary = EmptyObject> = [] extends TKeys ? TResults : First<TKeys> extends keyof T ? IfNever<T[First<TKeys>], ProcessObj$1<T, AfterFirst<TKeys>, TResults>, ProcessObj$1<T, AfterFirst<TKeys>, First<TKeys> extends keyof T ? TResults extends readonly unknown[] ? [...TResults, T[First<TKeys>]] : TResults extends Dictionary ? TResults & Record<First<TKeys>, T[First<TKeys>]> : never : never>> : never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inferred-types",
3
- "version": "0.53.8",
3
+ "version": "0.53.10",
4
4
  "description": "Functions which provide useful type inference on TS projects",
5
5
  "license": "MIT",
6
6
  "author": "Ken Snyder<ken@ken.net>",