Socket
Socket
Sign inDemoInstall

expect-type

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect-type - npm Package Compare versions

Comparing version 0.14.2 to 0.15.0

2

dist/index.d.ts

@@ -64,3 +64,3 @@ export declare type Not<T extends boolean> = T extends true ? false : true;

declare type ReadonlyEquivalent<X, Y> = Extends<(<T>() => T extends X ? true : false), (<T>() => T extends Y ? true : false)>;
export declare type Extends<L, R> = IsNever<L> extends true ? IsNever<R> : L extends R ? true : false;
export declare type Extends<L, R> = IsNever<L> extends true ? IsNever<R> : [L] extends [R] ? true : false;
export declare type StrictExtends<L, R> = Extends<DeepBrand<L>, DeepBrand<R>>;

@@ -67,0 +67,0 @@ export declare type Equal<Left, Right> = And<[StrictExtends<Left, Right>, StrictExtends<Right, Left>]>;

{
"name": "expect-type",
"version": "0.14.2",
"version": "0.15.0",
"keywords": [

@@ -31,2 +31,5 @@ "typescript",

},
"np": {
"cleanup": false
},
"devDependencies": {

@@ -37,2 +40,3 @@ "@types/jest": "29.0.0",

"jest": "28.1.3",
"np": "7.6.2",
"ts-jest": "28.0.8",

@@ -39,0 +43,0 @@ "typescript": "4.8.2"

@@ -5,2 +5,3 @@ # expect-type

[![](https://byob.yarr.is/mmkal/expect-type/coverage)](https://github.com/mmkal/expect-type/actions/workflows/ci.yml)
![npm](https://img.shields.io/npm/dt/expect-type)

@@ -180,2 +181,9 @@ Compile-time tests for types. Useful to make sure types don't regress into being overly-permissive as changes go in over time.

Detect assignability of unioned types:
```typescript
expectTypeOf<number>().toMatchTypeOf<string | number>()
expectTypeOf<string | number>().not.toMatchTypeOf<number>()
```
Use `.extract` and `.exclude` to narrow down complex union types:

@@ -182,0 +190,0 @@

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