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

expect-type

Package Overview
Dependencies
Maintainers
1
Versions
58
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.5.4 to 0.5.5

9

CHANGELOG.md

@@ -6,2 +6,11 @@ # Change Log

## [0.5.5](https://github.com/mmkal/ts/compare/expect-type@0.5.4...expect-type@0.5.5) (2020-04-26)
**Note:** Version bump only for package expect-type
## [0.5.4](https://github.com/mmkal/ts/compare/expect-type@0.5.3...expect-type@0.5.4) (2020-04-11)

@@ -8,0 +17,0 @@

4

package.json
{
"name": "expect-type",
"version": "0.5.4",
"version": "0.5.5",
"repository": "https://github.com/mmkal/ts",

@@ -19,3 +19,3 @@ "homepage": "https://github.com/mmkal/ts/tree/master/packages/expect-type#readme",

],
"gitHead": "4060601fc5a4294fa6b2a18a29f87dfb8ccd2bba"
"gitHead": "767862ae6f57e62601922d803e8fd711a993fc39"
}

@@ -207,7 +207,7 @@ # expect-type

- a fluent, jest-inspired API, making the difference between `actual` and `expected` clear. This becomes especially important with complex types and assertions.
- a fluent, jest-inspired API, making the difference between `actual` and `expected` clear. This is helpful with complex types and assertions.
- inverting assertions intuitively and easily via `expectType(...).not`
- first-class support for:
- `any` (as well as `unknown` and `never`).
- This can be especially useful in combination with `not`, to protect against functions returning too-permissive types. e.g. `const parseFile = (filename: string) => JSON.parse(readFileSync(filename).toString())` returns `any`, which could lead to errors. After giving it a proper return-type, you can add a test for this with `expect(parseFile).returns.not.toBeAny()`
- This can be especially useful in combination with `not`, to protect against functions returning too-permissive types. For example, `const parseFile = (filename: string) => JSON.parse(readFileSync(filename).toString())` returns `any`, which could lead to errors. After giving it a proper return-type, you can add a test for this with `expect(parseFile).returns.not.toBeAny()`
- object properties

@@ -214,0 +214,0 @@ - function parameters

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