type-assertions
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -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 |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4957
48
31