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

@shopify/useful-types

Package Overview
Dependencies
Maintainers
27
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/useful-types - npm Package Compare versions

Comparing version 5.1.1 to 5.1.2

40

build/ts/types.d.ts

@@ -1,39 +0,39 @@

export declare type ArrayElement<T> = T extends (infer U)[] ? U : never;
export declare type DeepPartial<T> = {
export type ArrayElement<T> = T extends (infer U)[] ? U : never;
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends infer TP ? TP extends (infer U)[] ? DeepPartial<U>[] : TP extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : DeepPartial<T[P]> : T[P];
};
export declare type IfEmptyObject<Obj, If, Else = never> = keyof Obj extends {
export type IfEmptyObject<Obj, If, Else = never> = keyof Obj extends {
length: 0;
} ? If : Else;
export declare type IfAllOptionalKeys<Obj, If, Else = never> = NonOptionalKeys<Obj> extends {
export type IfAllOptionalKeys<Obj, If, Else = never> = NonOptionalKeys<Obj> extends {
length: 0;
} ? If : Else;
export declare type IfAllNullableKeys<Obj, If, Else = never> = NonNullableKeys<Obj> extends {
export type IfAllNullableKeys<Obj, If, Else = never> = NonNullableKeys<Obj> extends {
length: 0;
} ? If : Else;
export declare type NonOptionalKeys<T> = {
export type NonOptionalKeys<T> = {
[K in keyof T]-?: undefined extends T[K] ? never : K;
}[keyof T];
export declare type NonNullableKeys<T> = {
export type NonNullableKeys<T> = {
[K in keyof T]-?: null extends T[K] ? never : K;
}[keyof T];
export declare type NoInfer<T> = {
export type NoInfer<T> = {
[K in keyof T]: T[K];
} & T;
declare type ReactStatics = 'displayName' | 'getDerivedStateFromProps' | 'getDerivedStateFromErrors' | 'childContextTypes' | 'contextType' | 'contextTypes' | 'getDefaultProps' | 'propTypes';
export declare type NonReactStatics<T> = Pick<T, Exclude<keyof T, ReactStatics>>;
export declare type ExtendedWindow<T> = Window & typeof globalThis & T;
declare type DeepOmitHelper<T, K> = {
type ReactStatics = 'displayName' | 'getDerivedStateFromProps' | 'getDerivedStateFromErrors' | 'childContextTypes' | 'contextType' | 'contextTypes' | 'getDefaultProps' | 'propTypes';
export type NonReactStatics<T> = Pick<T, Exclude<keyof T, ReactStatics>>;
export type ExtendedWindow<T> = Window & typeof globalThis & T;
type DeepOmitHelper<T, K> = {
[P in keyof T]: T[P] extends infer TP ? TP extends (infer U)[] ? DeepOmit<U, K>[] : DeepOmit<TP, K> : T[P];
};
declare type Primitive = string | Function | number | boolean | Symbol | undefined | null;
export declare type DeepOmit<T, K> = T extends Primitive ? T : K extends keyof T ? Omit<DeepOmitHelper<T, K>, K> : DeepOmitHelper<T, K>;
export declare type DeepOmitArray<T extends any[], K> = {
type Primitive = string | Function | number | boolean | Symbol | undefined | null;
export type DeepOmit<T, K> = T extends Primitive ? T : K extends keyof T ? Omit<DeepOmitHelper<T, K>, K> : DeepOmitHelper<T, K>;
export type DeepOmitArray<T extends any[], K> = {
[P in keyof T]: DeepOmit<T[P], K>;
};
export declare type PartialSome<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export declare type RequireSome<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
declare type IsAny<T> = 0 extends 1 & T ? true : false;
declare type IsUnknown<T> = IsAny<T> extends true ? false : unknown extends T ? true : false;
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends WeakSet<infer U> ? WeakSet<DeepReadonly<U>> : T extends Promise<infer U> ? Promise<DeepReadonly<U>> : T extends {} ? {
export type PartialSome<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export type RequireSome<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
type IsAny<T> = 0 extends 1 & T ? true : false;
type IsUnknown<T> = IsAny<T> extends true ? false : unknown extends T ? true : false;
export type DeepReadonly<T> = T extends Primitive ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends WeakSet<infer U> ? WeakSet<DeepReadonly<U>> : T extends Promise<infer U> ? Promise<DeepReadonly<U>> : T extends {} ? {
readonly [K in keyof T]: DeepReadonly<T[K]>;

@@ -40,0 +40,0 @@ } : IsUnknown<T> extends true ? unknown : Readonly<T>;

@@ -1,1 +0,1 @@

module.exports = require("./build/cjs/index.js");
module.exports = require("./build/cjs/index.js");
{
"name": "@shopify/useful-types",
"version": "5.1.1",
"version": "5.1.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A few handy TypeScript types",

@@ -12,3 +12,3 @@ # `@shopify/useful-types`

```bash
$ yarn add @shopify/useful-types
yarn add @shopify/useful-types
```

@@ -15,0 +15,0 @@

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

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