0.5.1 • Published 3 years ago
@aurospire/jestype v0.5.1
jestype
A Jest Utility for Compile Time Type Assertions
Logical Types
Switch
- Ability to prohibit function call with rest final parameter
Switch<Condition: boolean, Inverted: boolean = false> =>
(Condition !== Inverted && Condition !== boolean) =>
true => []
default => [never]If
If<Condition: boolean, Then: any, Else: any> =>
true => Then
false => Else
default => Then | ElseNot
Not<Value: boolean> =>
true => false
false => true
boolean => booleanAnd
And<Left: boolean, Right: right> =>
(Left & Right === true) =>
true => true
default => falseNand
Nand<Left: boolean, Right: boolean> =>
(Left & Right !== true) =>
true => true
default => falseOr
And<Left: boolean, Right: boolean> =>
(Left | Right === true) =>
true => true
default => falseNor
And<Left: boolean, Right: boolean> =>
(Left | Right !== true) =>
true => true
default => falseXor
And<Left: boolean, Right: boolean> =>
(Left ^ Right === true) =>
true => true
default => falseEq
And<Left: boolean, Right: boolean> =>
(Left ^ Right !== true) =>
true => true
default => falseAll
And<Items: boolean[]> =>
(AND(...Items) === true) =>
true => true
default => falseAny
And<Items: boolean[]> =>
(OR(...Items) === true) =>
true => true
default => falseNone
And<Items: boolean[]> =>
(OR(...Items) !== true) =>
true => true
default => false