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

type-plus

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-plus - npm Package Compare versions

Comparing version 1.22.0 to 1.23.0

lib/getField.d.ts

1

lib/index.d.ts

@@ -10,2 +10,3 @@ export { required, requiredDeep } from 'unpartial';

export * from './forEachKey';
export * from './getField';
export * from './Id';

@@ -12,0 +13,0 @@ export * from './isPromise';

@@ -14,2 +14,3 @@ "use strict";

__export(require("./forEachKey"));
__export(require("./getField"));
__export(require("./Id"));

@@ -16,0 +17,0 @@ __export(require("./isPromise"));

@@ -10,2 +10,3 @@ export { required, requiredDeep } from 'unpartial';

export * from './forEachKey';
export * from './getField';
export * from './Id';

@@ -12,0 +13,0 @@ export * from './isPromise';

@@ -7,2 +7,3 @@ export { required, requiredDeep } from 'unpartial';

export * from './forEachKey';
export * from './getField';
export * from './Id';

@@ -9,0 +10,0 @@ export * from './isPromise';

11

package.json
{
"name": "type-plus",
"version": "1.22.0",
"version": "1.23.0",
"description": "Provides additional types for `typescript`.",

@@ -40,10 +40,11 @@ "homepage": "https://github.com/unional/type-plus",

"dependencies": {
"unpartial": "^0.6.2"
"unpartial": "^0.6.3"
},
"devDependencies": {
"@types/jest": "^24.0.12",
"@types/jest": "^24.0.15",
"@unional/devpkg-node": "^1.3.0",
"assertron": "^7.0.2",
"assertron": "^7.1.2",
"jest": "^24.8.0",
"size-limit": "^1.3.2"
"size-limit": "^1.3.7",
"typescript": "^3.5.2"
},

@@ -50,0 +51,0 @@ "size-limit": [

@@ -62,10 +62,6 @@ # type-plus

- `ExcludePropType<T, U>`: excludes type `U` from properties in `T`.
- `facade(subject, ...props)`: create a facade of `subject`.
- `PartialPick<T, U>`: makes the properties specified in `U` becomes optional.
- `PartialExcept<T, U>`: makes the properties not specified in `U` becomes optional.
- `pick(obj, ...props)`: pick properties from `obj`.
- `RecursivePartial<T>`: make type `T` optional recursively.
- `RecursiveRequired<T>`: make type `T` required recursively.
- `required(...)`: merge options and removing `Partial<T>`. From [`unpartial`](https://github.com/unional/unpartial)
- `requiredDeep(...)`: merge options deeply and removing `Partial<T>`. From [`unpartial`](https://github.com/unional/unpartial)
- `RequiredPick<T, U>`: makes the properties specified in `U` becomes required.

@@ -75,3 +71,2 @@ - `RequiredExcept<T, U>`: makes the properties not specified in `U` becomes required.

- `ValueOf<T>`: type of the value of the properties of `T`.
- `tryAssign<S, T>(from: S, to: T)`: try assign `from` to `to`. Return type `never` if not possible.
- PropType: ...no helper type for this. Just do `YourType['propName']`

@@ -86,2 +81,11 @@

### Utility Functions
- `facade(subject, ...props)`: create a facade of `subject`.
- `getField(subject, key, defaultValue)`: get a field from a subject. Works against nullable and optional subject.
- `pick(obj, ...props)`: pick properties from `obj`.
- `required(...)`: merge options and removing `Partial<T>`. From [`unpartial`](https://github.com/unional/unpartial)
- `requiredDeep(...)`: merge options deeply and removing `Partial<T>`. From [`unpartial`](https://github.com/unional/unpartial)
- `tryAssign<S, T>(from: S, to: T)`: try assign `from` to `to`. Return type `never` if not possible.
## Attribution

@@ -88,0 +92,0 @@

@@ -10,2 +10,3 @@ export { required, requiredDeep } from 'unpartial';

export * from './forEachKey';
export * from './getField';
export * from './Id';

@@ -32,1 +33,2 @@ export * from './isPromise';

export * from './ValueOf';

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