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

type-assertions

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-assertions - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

1

lib/index.d.ts

@@ -5,2 +5,3 @@ /**

export declare type Assert<T extends true> = T;
export declare function assert<T extends true>(): T;
/**

@@ -7,0 +8,0 @@ * convert all types that are not `true` to `false`

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function assert() {
return true;
}
exports.assert = assert;
//# sourceMappingURL=index.js.map

2

package.json

@@ -32,3 +32,3 @@ {

},
"version": "1.0.0"
"version": "1.1.0"
}

@@ -12,16 +12,14 @@ # Type Assertions

export type t1 = ta.Assert<ta.Not<ta.Equal<{x: 1}, never>>>;
export type t1a = ta.Assert<ta.Not<ta.Equal<never, {x: 1}>>>;
ta.assert<ta.Not<ta.Equal<{x: 1}, never>>>();
ta.assert<ta.Not<ta.Equal<never, {x: 1}>>>();
export type t2 = ta.Assert<ta.Not<ta.Equal<{x: 1}, {y: 1}>>>;
export type t2a = ta.Assert<ta.Not<ta.Equal<{y: 1}, {x: 1}>>>;
ta.assert<ta.Not<ta.Equal<{x: 1}, {y: 1}>>>();
ta.assert<ta.Not<ta.Equal<{y: 1}, {x: 1}>>>();
export type t3 = ta.Assert<ta.Extends<{x: 1}, any>>;
export type t4 = ta.Assert<ta.Not<ta.Extends<any, {x: 1}>>>;
ta.assert<ta.Extends<{x: 1}, any>>();
ta.assert<ta.Not<ta.Extends<any, {x: 1}>>>();
export type t5 = ta.Assert<ta.UnionIncludesExact<string | number, string>>;
export type t6 = ta.Assert<
ta.Not<ta.UnionIncludesExact<string | number, 'hello'>>
>;
export type t7 = ta.Assert<ta.Not<ta.UnionIncludesExact<number, 'hello'>>>;
ta.assert<ta.UnionIncludesExact<string | number, string>>();
ta.assert<ta.Not<ta.UnionIncludesExact<string | number, 'hello'>>>();
ta.assert<ta.Not<ta.UnionIncludesExact<number, 'hello'>>>();
```

@@ -28,0 +26,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