@tanstack/form-core
Advanced tools
Comparing version 0.16.1 to 0.16.2
@@ -27,3 +27,3 @@ export type RequiredByKey<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>; | ||
}[keyof T]; | ||
export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 5 ? never : unknown extends T ? PrefixFromDepth<string, TDepth> : object extends T ? PrefixFromDepth<string, TDepth> : T extends readonly any[] & IsTuple<T> ? PrefixTupleAccessor<T, AllowedIndexes<T>, TDepth> : T extends any[] ? PrefixArrayAccessor<T, [...TDepth, any]> : T extends Date ? never : T extends object ? PrefixObjectAccessor<T, TDepth> : never; | ||
export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 5 ? never : unknown extends T ? PrefixFromDepth<string, TDepth> : object extends T ? PrefixFromDepth<string, TDepth> : T extends readonly any[] & IsTuple<T> ? PrefixTupleAccessor<T, AllowedIndexes<T>, TDepth> : T extends any[] ? PrefixArrayAccessor<T, [...TDepth, any]> : T extends Date ? never : T extends object ? PrefixObjectAccessor<T, TDepth> : T extends string | number | boolean | bigint ? '' : never; | ||
type PrefixFromDepth<T extends string | number, TDepth extends any[]> = TDepth['length'] extends 0 ? T : `.${T}`; | ||
@@ -30,0 +30,0 @@ /** |
@@ -50,2 +50,5 @@ function functionalUpdate(updater, input) { | ||
const finalPath = path[0]; | ||
if (Array.isArray(parent) && typeof finalPath === "number") { | ||
return parent.filter((_, i) => i !== finalPath); | ||
} | ||
const { [finalPath]: remove, ...rest } = parent; | ||
@@ -52,0 +55,0 @@ return rest; |
{ | ||
"name": "@tanstack/form-core", | ||
"version": "0.16.1", | ||
"version": "0.16.2", | ||
"description": "Powerful, type-safe, framework agnostic forms.", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
@@ -81,3 +81,5 @@ export type RequiredByKey<T, K extends keyof T> = Omit<T, K> & | ||
? PrefixObjectAccessor<T, TDepth> | ||
: never | ||
: T extends string | number | boolean | bigint | ||
? '' | ||
: never | ||
@@ -84,0 +86,0 @@ type PrefixFromDepth< |
@@ -82,2 +82,5 @@ import type { ValidationCause } from './types' | ||
const finalPath = path[0]! | ||
if (Array.isArray(parent) && typeof finalPath === 'number') { | ||
return parent.filter((_, i) => i !== finalPath) | ||
} | ||
const { [finalPath]: remove, ...rest } = parent | ||
@@ -84,0 +87,0 @@ return rest |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
348170
5774