Socket
Socket
Sign inDemoInstall

@peersyst/react-types

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peersyst/react-types - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

4

CHANGELOG.md
# Versions
## 1.5.2
[ReactChild] Add `ReactChild` type as it is deprecated in the react package
## 1.3.4

@@ -4,0 +8,0 @@

49

index.d.ts

@@ -1,4 +0,7 @@

import { CSSProperties } from "react";
import { CSSProperties, ReactElement } from "react";
/**
* REACT TYPES
*/
/**
* Generates a type that passes some styling props to be evaluated and

@@ -9,3 +12,8 @@ * generate a style or a simple style ignoring passed props.

export type ReactChild = ReactElement | string | number;
/**
* COMMON TYPES
*/
/**
* Generate a set of string literal types with the given default record `T` and

@@ -17,4 +25,6 @@ * override record `U`.

*/
export type OverridableStringUnion<T extends string | number, U = Record<string, any>> =
GenerateStringUnion<Overwrite<Record<T, true>, U>>;
export type OverridableStringUnion<
T extends string | number,
U = Record<string, any>,
> = GenerateStringUnion<Overwrite<Record<T, true>, U>>;

@@ -130,10 +140,12 @@ /**

type FlattenedNestedKeys<T extends object> = FlattenedCoreNestedKeys<T>;
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>];
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>];

@@ -144,7 +156,10 @@ /**

type DeepPick<T extends object, K extends NestedKeys<T>> = CoreDeepPick<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];
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];
{
"name": "@peersyst/react-types",
"author": "Peersyst",
"version": "1.5.1",
"version": "1.5.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "types": "./index.d.ts",

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