type-fest
Advanced tools
Comparing version 4.29.1 to 4.30.0
@@ -131,2 +131,3 @@ // Basic | ||
export type {Paths} from './source/paths'; | ||
export type {SharedUnionFields} from './source/shared-union-fields'; | ||
export type {SharedUnionFieldsDeep} from './source/shared-union-fields-deep'; | ||
@@ -133,0 +134,0 @@ export type {IsNull} from './source/is-null'; |
{ | ||
"name": "type-fest", | ||
"version": "4.29.1", | ||
"version": "4.30.0", | ||
"description": "A collection of essential TypeScript types", | ||
@@ -5,0 +5,0 @@ "license": "(MIT OR CC0-1.0)", |
@@ -204,2 +204,3 @@ <div align="center"> | ||
- [`Paths`](source/paths.d.ts) - Generate a union of all possible paths to properties in the given object. | ||
- [`SharedUnionFields`](source/shared-union-fields.d.ts) - Create a type with shared fields from a union of object types. | ||
- [`SharedUnionFieldsDeep`](source/shared-union-fields-deep.d.ts) - Create a type with shared fields from a union of object types, deeply traversing nested structures. | ||
@@ -206,0 +207,0 @@ - [`DistributedOmit`](source/distributed-omit.d.ts) - Omits keys from a type, distributing the operation over a union. |
@@ -25,2 +25,6 @@ import type {UnknownArrayOrTuple} from './internal'; | ||
*/ | ||
export type ArrayTail<TArray extends UnknownArrayOrTuple> = TArray extends readonly [unknown, ...infer Tail] ? Tail : []; | ||
export type ArrayTail<TArray extends UnknownArrayOrTuple> = TArray extends readonly [unknown?, ...infer Tail] | ||
? keyof TArray & `${number}` extends never | ||
? [] | ||
: Tail | ||
: []; |
@@ -51,9 +51,9 @@ import type {NonRecursiveType, UnionMin, UnionMax, TupleLength, StaticPartOfArray, VariablePartOfArray, IsUnion, IsArrayReadonly, SetArrayAccess} from './internal'; | ||
// { | ||
// name: string; | ||
// type: 'cat'; | ||
// catType: string; // Needn't care about this field, because it's not a common pet info field. | ||
// name: string; | ||
// type: 'cat'; | ||
// catType: string; // Needn't care about this field, because it's not a common pet info field. | ||
// } | { | ||
// name: string; | ||
// type: 'dog'; | ||
// dogType: string; // Needn't care about this field, because it's not a common pet info field. | ||
// name: string; | ||
// type: 'dog'; | ||
// dogType: string; // Needn't care about this field, because it's not a common pet info field. | ||
// } | ||
@@ -70,4 +70,4 @@ | ||
// { | ||
// name: string; | ||
// type: 'cat' | 'dog'; | ||
// name: string; | ||
// type: 'cat' | 'dog'; | ||
// } | ||
@@ -82,2 +82,4 @@ | ||
@see SharedUnionFields | ||
@category Object | ||
@@ -84,0 +86,0 @@ @category Union |
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
400263
162
9544
1063