1 | import { And } from '../Boolean/And';
|
2 | import { Or } from '../Boolean/Or';
|
3 | import { Extends } from '../Any/Extends';
|
4 |
|
5 |
|
6 |
|
7 | export declare type IsStringLiteral<A extends any> = A extends string ? string extends A ? 0 : 1 : 0;
|
8 |
|
9 |
|
10 |
|
11 | export declare type IsNumberLiteral<A extends any> = A extends number ? number extends A ? 0 : 1 : 0;
|
12 |
|
13 |
|
14 |
|
15 | export declare type Kind = string | number;
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | export declare type IsLiteral<A extends any, kind extends Kind = Kind> = And<Or<IsStringLiteral<A>, IsNumberLiteral<A>>, Extends<A, kind>>;
|