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.8.0 to 1.9.0

src/ExcludePropType.spec.ts

2

package.json
{
"name": "type-plus",
"description": "Provides additional types for `typescript`.",
"version": "1.8.0",
"version": "1.9.0",
"homepage": "https://github.com/unional/type-plus",

@@ -6,0 +6,0 @@ "bugs": {

@@ -37,12 +37,17 @@ # type-plus

### Array function
- `literalArray(...entries)`: return an array those items are restricted to the provided literals.
### Type manipulation
- `ExcludePropType<T, U>`: excludes type `U` from properties in `T`.
- `PartialPick<T, U>`: makes the properties specified in `U` becomes optional.
- `PartialExcept<T, U>`: makes the properties not specified in `U` becomes optional.
- `RecursivePartial<T>`: make type T optional recursively.
- `RecursiveRequired<T>`: make type T required recursively.
- `RecursivePartial<T>`: make type `T` optional recursively.
- `RecursiveRequired<T>`: make type `T` required recursively.
- `RequiredPick<T, U>`: makes the properties specified in `U` becomes required.
- `RequiredExcept<T, U>`: makes the properties not specified in `U` becomes required.
- `RecursiveIntersect<T, U>`: intersect type U onto T recursively.
- `ValueOf<T>`: type of the value of the properties of T.
- `RecursiveIntersect<T, U>`: intersect type `U` onto `T` recursively.
- `ValueOf<T>`: type of the value of the properties of `T`.

@@ -49,0 +54,0 @@ ## Contribute

@@ -7,6 +7,6 @@ import { literalArray } from '.';

let y = actual[0]
// the cast is just for assignment. Does not affect type.
let x: (typeof y) & 'c' = 1 as never
let x: (typeof actual[number]) & 'c' = 'c' as never
isNever(x)
})

@@ -8,1 +8,5 @@ export function excludeUndefined<T>(actual: T): Exclude<T, undefined> { return actual as any }

}
export function isNumber(_: number) {
return true
}
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