@peersyst/react-types
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -28,2 +28,6 @@ import { CSSProperties, ReactElement } from "react"; | ||
> = GenerateStringUnion<Overwrite<Record<T, true>, U>>; | ||
export type OverridableStringUnion< | ||
T extends string | number, | ||
U = Record<string, any>, | ||
> = GenerateStringUnion<Overwrite<Record<T, true>, U>>; | ||
@@ -149,2 +153,12 @@ /** | ||
}[Extract<keyof T, string>]; | ||
type FlattenedCoreNestedKeys< | ||
T extends object, | ||
I extends number = MaxRecursiveIterations, | ||
> = I extends 0 | ||
? never | ||
: { | ||
[Key in keyof T]: T[Key] extends object | ||
? `${Key}.${CoreNestedKeys<T[Key], Iterations[I]>}` | ||
: Key; | ||
}[Extract<keyof T, string>]; | ||
@@ -164,1 +178,16 @@ /** | ||
: T[K]; | ||
type CoreDeepPick< | ||
T extends object, | ||
K extends string, | ||
I extends number = MaxRecursiveIterations, | ||
> = I extends 0 | ||
? never | ||
: K extends `${infer FirstKey}.${infer RestKey}` | ||
? CoreDeepPick<T[FirstKey], RestKey, Iterations[I]> | ||
: T[K]; | ||
/** | ||
* Updater types | ||
*/ | ||
export type Updater<T> = T | ((old: T) => T); | ||
export type UpdaterFn<T> = (updaterOrValue: Updater<T>) => void; |
{ | ||
"name": "@peersyst/react-types", | ||
"author": "Peersyst", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "types": "./index.d.ts", |
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
6938
168