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

utility-types

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utility-types - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

2

dist/index.d.ts

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

export { $Call, $Keys, $Values, $ReadOnly, $Diff, $PropertyType, $ElementType, } from './utility-types';
export { $Call, $Keys, $Values, $ReadOnly, $Diff, $PropertyType, $ElementType, $Shape, } from './utility-types';
export { Assign, DeepReadonly, DeepRequired, DeepNonNullable, Diff, FunctionKeys, Intersection, NonFunctionKeys, NonUndefined, Omit, Overwrite, PromiseType, SetComplement, SetDifference, SetIntersection, Subtract, SymmetricDifference, Unionize, } from './mapped-types';
export { getReturnOfExpression } from './functional-helpers';

@@ -11,1 +11,2 @@ import { SetComplement, DeepReadonly } from './mapped-types';

export declare type $Call<Fn extends (...args: any[]) => any> = Fn extends (arg: any) => infer RT ? RT : never;
export declare type $Shape<T extends object> = Partial<T>;
{
"name": "utility-types",
"version": "3.0.0",
"version": "3.1.0",
"description": "Utility Types Collection for TypeScript",

@@ -5,0 +5,0 @@ "author": "Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io)",

@@ -104,2 +104,3 @@ # utility-types

* [`$Call<T>`](#callt)
* [`$Shape<T>`](#shapet)

@@ -673,2 +674,20 @@ ## Deprecated API (use at own risk)

### `$Shape<T>`
Copies the shape of the type supplied, but marks every field optional.
https://flow.org/en/docs/types/utilities/#toc-shape
**Usage:**
```ts
import { $Shape } from 'utility-types';
type Props = { name: string; age: number; visible: boolean };
type PartialProps = $Shape<Props>;
// Expect: Partial<Props>
```
[⇧ back to top](#flows-utility-types)
---

@@ -675,0 +694,0 @@

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