Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/form-core

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/form-core - npm Package Compare versions

Comparing version 0.21.0 to 0.21.1

4

dist/esm/util-types.d.ts

@@ -27,5 +27,5 @@ type Nullable<T> = T | null;

type PrefixObjectAccessor<T extends object, TDepth extends any[]> = {
[K in keyof T]: K extends string | number ? PrefixFromDepth<K, TDepth> | `${PrefixFromDepth<K, TDepth>}${DeepKeys<T[K], [TDepth]>}` : never;
[K in keyof T]-?: K extends string | number ? PrefixFromDepth<K, TDepth> | `${PrefixFromDepth<K, TDepth>}${DeepKeys<T[K], [TDepth]>}` : never;
}[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> : T extends string | number | boolean | bigint ? '' : never;
export type DeepKeys<T, TDepth extends any[] = []> = TDepth['length'] extends 5 ? never : unknown 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}`;

@@ -32,0 +32,0 @@ /**

{
"name": "@tanstack/form-core",
"version": "0.21.0",
"version": "0.21.1",
"description": "Powerful, type-safe, framework agnostic forms.",

@@ -36,5 +36,5 @@ "author": "tannerlinsley",

"dependencies": {
"@tanstack/store": "^0.3.1"
"@tanstack/store": "^0.4.1"
},
"scripts": {}
}

@@ -45,2 +45,14 @@ import { assertType } from 'vitest'

/**
* Properly handles deep partial object nesting like so:
*/
type NestedPartialSupport = DeepKeys<{ meta?: { mainUser?: User } }>
assertType<
| 'meta'
| 'meta.mainUser'
| 'meta.mainUser.name'
| 'meta.mainUser.id'
| 'meta.mainUser.age'
>(0 as never as NestedPartialSupport)
/**
* Properly handles `object` edgecase nesting like so:

@@ -47,0 +59,0 @@ */

@@ -63,3 +63,3 @@ type Nullable<T> = T | null

type PrefixObjectAccessor<T extends object, TDepth extends any[]> = {
[K in keyof T]: K extends string | number
[K in keyof T]-?: K extends string | number
?

@@ -75,15 +75,13 @@ | PrefixFromDepth<K, TDepth>

? 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
: 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

@@ -90,0 +88,0 @@ type PrefixFromDepth<

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc