You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@shopify/useful-types

Package Overview
Dependencies
Maintainers
19
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0 to 5.1.0

5

build/ts/types.d.ts

@@ -36,3 +36,8 @@ export declare type ArrayElement<T> = T extends (infer U)[] ? U : never;

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 {} ? {
readonly [K in keyof T]: DeepReadonly<T[K]>;
} : IsUnknown<T> extends true ? unknown : Readonly<T>;
export {};
//# sourceMappingURL=types.d.ts.map

5

package.json
{
"name": "@shopify/useful-types",
"version": "5.0.0",
"version": "5.1.0",
"license": "MIT",

@@ -42,4 +42,3 @@ "description": "A few handy TypeScript types",

}
},
"gitHead": "ef9afc562672dcda9d7800753dc6b777ecd2d751"
}
}

15

README.md

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

- `DeepPartial<T>`: Recusively maps over all properties in a type and transforms them to be optional. Useful when you need to make optional all of the properties (and nested properties) of an existing type.
- `DeepPartial<T>`: Recursively maps over all properties in a type and transforms them to be optional. Useful when you need to make optional all of the properties (and nested properties) of an existing type.

@@ -158,1 +158,14 @@ ```ts

```
- `DeepReadonly<T>`: Recursively maps over all properties in a type and transforms them to be read-only.
```ts
interface Obj {
foo: string;
bar: {
baz: boolean;
};
}
type DeepReadonlyObj = DeepReadonly<Obj>; // {readonly foo: string; readonly bar: { readonly baz: boolean }}
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc