UNPKG
type-samurai
Version:
latest (1.1.1)
1.1.1
1.1.0
1.0.1
1.0.0
Advanced utility types for Typescript
github.com/KamilHs/type-samurai
KamilHs/type-samurai
type-samurai
/
src
/
not.d.ts
12 lines
(11 loc)
•
276 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
/** * Accepts a boolean and returns `
true
`
if
the passed
type
is `
false
`, otherwise returns `
true
` * @example * ```ts * //
false
*
type
Case1 = Not<
true
> * //
true
*
type
Case2 = Not<
false
> * ``` */
export
type
Not<T extends boolean> = T extends
true
?
false
:
true
;