@eslinted/core 0.0.1-rc.0 → 0.0.1-rc.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +65 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/options/HtmlOption.d.ts +5 -0
  6. package/dist/options/HtmlOption.d.ts.map +1 -0
  7. package/dist/options/HtmlOption.js +16 -0
  8. package/dist/options/HtmlOption.js.map +1 -0
  9. package/dist/options/JsOption.d.ts +5 -0
  10. package/dist/options/JsOption.d.ts.map +1 -0
  11. package/dist/options/JsOption.js +19 -0
  12. package/dist/options/JsOption.js.map +1 -0
  13. package/dist/options/JsonOption.d.ts +5 -0
  14. package/dist/options/JsonOption.d.ts.map +1 -0
  15. package/dist/options/JsonOption.js +16 -0
  16. package/dist/options/JsonOption.js.map +1 -0
  17. package/dist/options/JsoncOption.d.ts +5 -0
  18. package/dist/options/JsoncOption.d.ts.map +1 -0
  19. package/dist/options/JsoncOption.js +16 -0
  20. package/dist/options/JsoncOption.js.map +1 -0
  21. package/dist/options/MdOption.d.ts +5 -0
  22. package/dist/options/MdOption.d.ts.map +1 -0
  23. package/dist/options/MdOption.js +16 -0
  24. package/dist/options/MdOption.js.map +1 -0
  25. package/dist/options/SvelteOption.d.ts +10 -0
  26. package/dist/options/SvelteOption.d.ts.map +1 -0
  27. package/dist/options/SvelteOption.js +28 -0
  28. package/dist/options/SvelteOption.js.map +1 -0
  29. package/dist/options/TsOption.d.ts +8 -0
  30. package/dist/options/TsOption.d.ts.map +1 -0
  31. package/dist/options/TsOption.js +25 -0
  32. package/dist/options/TsOption.js.map +1 -0
  33. package/dist/options/YmlOption.d.ts +5 -0
  34. package/dist/options/YmlOption.d.ts.map +1 -0
  35. package/dist/options/YmlOption.js +16 -0
  36. package/dist/options/YmlOption.js.map +1 -0
  37. package/dist/options/option/Option.d.ts +5 -0
  38. package/dist/options/option/Option.d.ts.map +1 -0
  39. package/dist/options/option/Option.js +7 -0
  40. package/dist/options/option/Option.js.map +1 -0
  41. package/dist/options.d.ts +18 -0
  42. package/dist/options.d.ts.map +1 -0
  43. package/dist/options.js +17 -0
  44. package/dist/options.js.map +1 -0
  45. package/dist/rulesets/ruleset/Ruleset.d.ts +12 -0
  46. package/dist/rulesets/ruleset/Ruleset.d.ts.map +1 -0
  47. package/dist/rulesets/ruleset/Ruleset.js +27 -0
  48. package/dist/rulesets/ruleset/Ruleset.js.map +1 -0
  49. package/dist/rulesets/ruleset/rule/Rule.d.ts +6 -0
  50. package/dist/rulesets/ruleset/rule/Rule.d.ts.map +1 -0
  51. package/dist/rulesets/ruleset/rule/Rule.js +9 -0
  52. package/dist/rulesets/ruleset/rule/Rule.js.map +1 -0
  53. package/dist/scopes.d.ts +3 -0
  54. package/dist/scopes.d.ts.map +1 -0
  55. package/dist/scopes.js +11 -0
  56. package/dist/scopes.js.map +1 -0
  57. package/interface/IConfig.d.ts +21 -0
  58. package/interface/files/IFiles.d.ts +1 -0
  59. package/interface/option/IOption.d.ts +25 -0
  60. package/interface/option/language/IOLanguage.d.ts +15 -0
  61. package/interface/option/language/ecma/IOLanguageEcma.d.ts +20 -0
  62. package/interface/option/language/globals/IOLanguageGlobals.d.ts +3 -0
  63. package/interface/option/language/parser/IOLanguageParser.d.ts +3 -0
  64. package/interface/option/language/parserOptions/IOLanguageParserOptions.d.ts +5 -0
  65. package/interface/option/language/source/IOLanguageSource.d.ts +12 -0
  66. package/interface/option/linter/IOLinter.d.ts +30 -0
  67. package/interface/option/name/IOName.d.ts +3 -0
  68. package/interface/option/plugins/IOPlugins.d.ts +3 -0
  69. package/interface/option/processor/IOProcessor.d.ts +3 -0
  70. package/interface/rules/IRules.d.ts +1 -0
  71. package/interface/rules/rule/IRule.d.ts +1 -0
  72. package/interface/rules/rule/state/RuleSeverity.d.ts +5 -0
  73. package/package.json +2 -2
  74. package/src/Scope.d.ts +9 -0
  75. package/src/index.ts +113 -0
  76. package/src/options/HtmlOption.ts +31 -0
  77. package/src/options/JsOption.ts +27 -0
  78. package/src/options/JsonOption.ts +31 -0
  79. package/src/options/JsoncOption.ts +31 -0
  80. package/src/options/MdOption.ts +31 -0
  81. package/src/options/SvelteOption.ts +47 -0
  82. package/src/options/TsOption.ts +40 -0
  83. package/src/options/YmlOption.ts +31 -0
  84. package/src/options/option/Option.ts +25 -0
  85. package/src/options.ts +17 -0
  86. package/src/plugins.d.ts +24 -0
  87. package/src/rulesets/ruleset/Ruleset.ts +50 -0
  88. package/src/rulesets/ruleset/rule/Rule.ts +6 -0
  89. package/src/scopes.ts +11 -0
  90. package/tsconfig.json +4 -2
  91. package/types/literal/number/base32.d.ts +19 -0
  92. package/types/literal/number/base64.d.ts +35 -0
  93. package/types/literal/number/binary.d.ts +4 -0
  94. package/types/literal/number/decimal.d.ts +5 -0
  95. package/types/literal/number/hex.d.ts +10 -0
  96. package/types/literal/number/octal.d.ts +7 -0
  97. package/types/literal/number/quatral.d.ts +4 -0
  98. package/types/literal/number/ternary.d.ts +4 -0
  99. package/types/literal/string/base64char.d.ts +13 -0
  100. package/types/literal/string/digit.d.ts +12 -0
  101. package/types/literal/string/hexchar.d.ts +9 -0
  102. package/types/literal/string/letter.d.ts +35 -0
  103. package/types/safe/Safe.d.ts +2 -0
  104. package/types/safe/numbers/finite/Finite.d.ts +2 -0
  105. package/types/safe/numbers/finite.d.ts +1 -0
  106. package/types/safe/numbers/fint.d.ts +1 -0
  107. package/types/safe/numbers/int/Int.d.ts +2 -0
  108. package/types/safe/numbers/int.d.ts +1 -0
  109. package/types/safe/numbers/numberful.d.ts +1 -0
  110. package/types/safe/numbers/polarity/Negative.d.ts +4 -0
  111. package/types/safe/numbers/polarity/Positive.d.ts +4 -0
  112. package/types/safe/numbers/polarity/pole/Pole.d.ts +18 -0
  113. package/types/safe/primitive.d.ts +5 -0
  114. package/types/safe/strings/char.d.ts +1 -0
  115. package/types/safe/strings/length/PropLength.d.ts +3 -0
  116. package/types/safe/strings/stringful.d.ts +1 -0
  117. package/types/utility/interface/construct/Particord.d.ts +1 -0
  118. package/types/utility/interface/construct/Property.d.ts +8 -0
  119. package/types/utility/interface/construct/Recordful.d.ts +5 -0
  120. package/types/utility/interface/construct/Table.d.ts +3 -0
  121. package/types/utility/interface/construct/properties/Field.d.ts +1 -0
  122. package/types/utility/interface/construct/properties/Flag.d.ts +1 -0
  123. package/types/utility/interface/construct/properties/Limit.d.ts +8 -0
  124. package/types/utility/interface/construct/properties/List.d.ts +1 -0
  125. package/types/utility/interface/construct/properties/Listish.d.ts +1 -0
  126. package/types/utility/interface/construct/properties/Scalar.d.ts +1 -0
  127. package/types/utility/interface/construct/tables/FieldTable.d.ts +1 -0
  128. package/types/utility/interface/construct/tables/FlagTable.d.ts +1 -0
  129. package/types/utility/interface/construct/tables/ListTable.d.ts +1 -0
  130. package/types/utility/interface/construct/tables/ListishTable.d.ts +1 -0
  131. package/types/utility/interface/construct/tables/ScalarTable.d.ts +1 -0
  132. package/types/utility/interface/identity/Interface.d.ts +80 -0
  133. package/types/utility/interface/identity/Keys.d.ts +71 -0
  134. package/types/utility/interface/transform/Unrequire.d.ts +45 -0
  135. package/types/utility/iterable/construct/ArrayN.d.ts +12 -0
  136. package/types/utility/iterable/construct/Tuple.d.ts +27 -0
  137. package/types/utility/iterable/construct/arrays/Arrays.d.ts +1 -0
  138. package/types/utility/iterable/construct/tuples/Tuples.d.ts +9 -0
  139. package/types/utility/iterable/identity/DyadType.d.ts +3 -0
  140. package/types/utility/iterable/identity/MonadType.d.ts +48 -0
  141. package/types/utility/iterable/identity/TriadType.d.ts +3 -0
  142. package/types/utility/iterable/identity/array/ArrayType.d.ts +65 -0
  143. package/types/utility/iterable/identity/array/length/ArrayLength.d.ts +16 -0
  144. package/types/utility/iterable/transform/Join.d.ts +19 -0
  145. package/types/utility/iterable/transform/Unflat.d.ts +3 -0
  146. package/types/utility/iterable/transform/stringarray/Chain.d.ts +30 -0
  147. package/types/utility/iterable/transform/stringarray/PathN.d.ts +3 -0
  148. package/types/utility/iterable/transform/stringarray/stringify/Stringify.d.ts +5 -0
  149. package/types/utility/length/Length.d.ts +35 -0
  150. package/types/utility/null/null.d.ts +1 -0
  151. package/types/utility/null/nullable.d.ts +1 -0
  152. package/types/utility/primitive/Primeval.d.ts +42 -0
  153. package/types/utility/primitive/boolean/True.d.ts +30 -0
  154. package/types/utility/primitive/number/Numbered.d.ts +35 -0
  155. package/types/utility/primitive/string/literal.d.ts +22 -0
  156. package/types/utility/primitive/string/literalful.d.ts +28 -0
@@ -0,0 +1,65 @@
1
+ declare type ArrayType<A> = [A] extends [readonly unknown[]] ? A : never;
2
+
3
+ // tests
4
+ declare namespace ArrayType {
5
+ export type T0 = ArrayType<[]>;
6
+ export type T1 = ArrayType<[1, 1]>;
7
+ export type T2 = ArrayType<string[]>;
8
+ export type T3 = ArrayType<readonly []>;
9
+ export type T4 = ArrayType<readonly [1, 1]>;
10
+ export type T5 = ArrayType<readonly string[]>;
11
+ export type T6 = ArrayType<[[]]>;
12
+ export type T7 = ArrayType<string[] | int[]>;
13
+ export type T8 = ArrayType<(string | int)[]>;
14
+ export type T9 = ArrayType<
15
+ | []
16
+ | [5, 10]
17
+ | string []
18
+ | readonly []
19
+ | readonly [5, 10]
20
+ | readonly string[]
21
+ >;
22
+ export type T10 = ArrayType<[1?, ...string[]]>;
23
+ export type T11 = ArrayType<[1] | [1, 2?]>;
24
+ }
25
+
26
+ declare namespace NotArrayType {
27
+ export type N0 = ArrayType<"">;
28
+ export type N1 = ArrayType<"test">;
29
+ export type N2 = ArrayType<string>;
30
+ export type N3 = ArrayType<boolean>;
31
+ export type N4 = ArrayType<true>;
32
+ export type N5 = ArrayType<false>;
33
+ export type N6 = ArrayType<0>;
34
+ export type N7 = ArrayType<1>;
35
+ export type N8 = ArrayType<number>;
36
+ export type N9 = ArrayType<null>;
37
+ export type N10 = ArrayType<undefined>;
38
+ export type N11 = ArrayType<unknown>;
39
+ export type N12 = ArrayType<never>;
40
+ export type N13 = ArrayType<void>;
41
+ export type N14 = ArrayType<()=> void>;
42
+ export type N15 = ArrayType<(a: string)=> []>;
43
+ export type N16 = ArrayType<Record<string, unknown>>;
44
+ export type N17 = ArrayType<Record<number, 5>>;
45
+ export type N18 = ArrayType<stringful>;
46
+ export type N19 = ArrayType<{ 0: string }>;
47
+ export type N20 = ArrayType<{
48
+ 0: string;
49
+ length: 1;
50
+ }>;
51
+ export type N21 = ArrayType<symbol>;
52
+ export type N22 = ArrayType<object>;
53
+ export type N23 = ArrayType<
54
+ | []
55
+ | object
56
+ >;
57
+ export type N24 = ArrayType<
58
+ | []
59
+ | string
60
+ >;
61
+ export type N25 = ArrayType<
62
+ | []
63
+ | null
64
+ >;
65
+ }
@@ -0,0 +1,16 @@
1
+ declare type ArrayLength<A extends readonly unknown[]> = Length<ArrayType<A>["length"]>;
2
+
3
+ declare namespace ArrayLength {
4
+ export type T0 = ArrayLength<[]>;
5
+ export type T0a = ArrayLength<string[]>;
6
+ export type T0b = ArrayLength<readonly []>;
7
+ export type T0d = ArrayLength<readonly string[]>;
8
+ export type T0c = ArrayLength<[string?, string?]>;
9
+ export type T1 = ArrayLength<[string] | [string, string?, string?]>;
10
+ export type T1b = ArrayLength<[string] | [string?, string?, string?]>; // 0 | 1 | 2 | 3 -- empty Tuple -> length: 0 is just 0, so does not consume other possible lengths
11
+ export type T1c = ArrayLength<string[] | [string, string, string]>; // 0 -- Array -> length: number coerced to length 0 but consumes all other possible lengths
12
+ }
13
+
14
+ declare namespace NotArrayLength {
15
+ export type N = ArrayLength<never>;
16
+ }
@@ -0,0 +1,19 @@
1
+ declare type Join<A extends readonly unknown[], D extends string = string> = ArrayType<A> extends never
2
+ ? never
3
+ : MonadType<A> extends never
4
+ ? string
5
+ : MonadType<A> extends readonly (infer I extends string)[]
6
+ ? [I] extends [stringful]
7
+ ? stringful
8
+ : Extract<I, stringful> extends never
9
+ ? literalful<I> extends never
10
+ ? DyadType<MonadType<A>> extends never
11
+ ? string
12
+ : literalful<D> extends never
13
+ ? [D] extends [stringful]
14
+ ? stringful
15
+ : string
16
+ : stringful
17
+ : stringful
18
+ : stringful
19
+ : never;
@@ -0,0 +1,3 @@
1
+ declare type Unflat<In = string, RO extends boolean = true> = [In] extends [never]
2
+ ? never
3
+ : In | (True<RO> extends never ? In[] : readonly In[]);
@@ -0,0 +1,30 @@
1
+ declare type Chain<
2
+ A extends readonly string[],
3
+ D extends string = "/",
4
+ Reverse extends boolean = false,
5
+ > = literal<D> extends never
6
+ ? never
7
+ : D extends D
8
+ ? ArrayType<A> extends never
9
+ ? never
10
+ : ArrayType<A> extends readonly [infer H extends string, ...infer T extends string[]]
11
+ ? ArrayType<T> extends readonly []
12
+ ? literalful<H>
13
+ : True<Reverse> extends never
14
+ ? `${literalful<H>}${literal<D>}${Chain<ArrayType<T>, literal<D>>}`
15
+ : `${Chain<ArrayType<T>, literal<D>, True<Reverse>>}${literal<D>}${literalful<H>}`
16
+ : never
17
+ : never;
18
+
19
+ declare namespace Chain {
20
+ export type T = Chain<["a", "b", "c"]>;
21
+ export type T0 = Chain<["a", "b", "c"], "">;
22
+ export type T0a = Chain<["a", "b", "c"], "-">;
23
+ export type T1 = Chain<["a", "b", "c"], "/", true>;
24
+ export type T1a = Chain<["a", "b", "c"], ".", true>;
25
+ export type T2 = Chain<["a", "b" | "bar", "c"]>;
26
+ export type T2a = Chain<["a" | "foo", "b" | "bar", "c"]>; // 4
27
+ export type T3 = Chain<["a", "b", "c"], "." | "/">;
28
+ export type T4 = Chain<["a" | "foo", "b" | "bar", "c"], "." | "/">; // 8
29
+ export type T5 = Chain<["a" | "foo", "b" | "bar", "c"], "." | "/", true>; // 8
30
+ }
@@ -0,0 +1,3 @@
1
+ declare type PathN<C, N extends number = 0> = Stringify<C> extends never
2
+ ? never
3
+ : ArrayN<Stringify<C>, N>;
@@ -0,0 +1,5 @@
1
+ declare type Stringify<C> = C extends Record<"string", infer S extends string>
2
+ ? S
3
+ : C extends Record<"toString", infer Fn extends ()=> string>
4
+ ? ReturnType<Fn>
5
+ : never;
@@ -0,0 +1,35 @@
1
+ declare type Length<N extends number> = [N] extends [number]
2
+ ? [number] extends [N]
3
+ ? 0
4
+ : Numbered<N>
5
+ : never;
6
+
7
+ declare namespace Length {
8
+ export type T0 = Length<0>;
9
+ export type T0a = Length<0.0>; // 0
10
+ export type T0b = Length<number>; // 0
11
+ export type T1 = Length<1>;
12
+ export type T1a = Length<1.0>; // 1
13
+ export type T2 = Length<1.1>; // 1.1
14
+ export type T3 = Length<1 | 5>; // 1 | 5
15
+ export type T3b = Length<0 | 1 | 5>; // 0 | 1 | 5
16
+ }
17
+
18
+ declare namespace NotLength {
19
+ export type N = Length<never>;
20
+
21
+ // export type N0 = Length<unknown>;
22
+ // export type N0a = Length<undefined>;
23
+ // export type N0b = Length<null>;
24
+ // export type N0c = Length<void>;
25
+ // export type N0d = Length<undefined>;
26
+ // export type N0e = Length<undefined>;
27
+ // export type N1 = Length<"1">;
28
+ // export type N1a = Length<true>;
29
+ // export type N1b = Length<[5, 5]>;
30
+ // export type N1c = Length<()=> void>;
31
+ // export type N1d = Length<object>;
32
+ // export type N2 = Length<null | 1>;
33
+ // export type N2a = Length<true | 1>;
34
+ // export type N2b = Length<number | 1>; // 0
35
+ }
@@ -0,0 +1 @@
1
+ declare type Null<T> = null | T;
@@ -0,0 +1 @@
1
+ declare type Nullable<T> = Null<NonNullable<T>>;
@@ -0,0 +1,42 @@
1
+ declare type Primeval<P extends T, T extends primitive> = [T] extends [primitive]
2
+ ? [P] extends [T]
3
+ ? Extract<P, object> extends never
4
+ ? Exclude<P, T> extends never
5
+ ? T extends P
6
+ ? never
7
+ : P
8
+ : never
9
+ : never
10
+ : never
11
+ : never;
12
+
13
+ declare namespace Primeval {
14
+ export type T0 = Primeval<"fast", string>;
15
+ export type T0a = Primeval<"", string>;
16
+ export type T0b = Primeval<"fast" | "good", string>;
17
+ export type T0c = Primeval<"fast" | "", string>;
18
+ export type T1 = Primeval<5, number>;
19
+ export type T1a = Primeval<0, number>;
20
+ export type T2 = Primeval<true, boolean>;
21
+ export type T2a = Primeval<false, boolean>;
22
+ }
23
+
24
+ declare namespace NotPrimeval {
25
+ export type N0 = Primeval<string, string>;
26
+ export type N0a = Primeval<number, number>;
27
+ export type N0b = Primeval<boolean, boolean>;
28
+ export type N1 = Primeval<stringful, string>;
29
+ export type N1b = Primeval<numberful, number>;
30
+
31
+ // export type N2 = Primeval<number | 5, number>;
32
+ // export type N2a = Primeval<string | "good", string>;
33
+ // export type N2b = Primeval<boolean | true, boolean>;
34
+ // export type N3 = Primeval<5, number | object>;
35
+ // export type N3a = Primeval<symbol, symbol>;
36
+ // export type N3b = Primeval<object, object>;
37
+ // export type N3c = Primeval<[], readonly unknown[]>;
38
+ // export type N3d = Primeval<()=> 5, Function>;
39
+ // export type N3e = Primeval<5, unknown>;
40
+ // export type N3f = Primeval<true | 10, boolean>;
41
+ // export type N3g = Primeval<string | "good", string>;
42
+ }
@@ -0,0 +1,30 @@
1
+ declare type True<B extends boolean> = true extends Primeval<B, boolean>
2
+ ? Primeval<B, boolean>
3
+ : never;
4
+
5
+ declare namespace True {
6
+ export type T0 = True<true>;
7
+ }
8
+
9
+ declare namespace NotTrue {
10
+
11
+ export type N0 = True<never>;
12
+ export type N1 = True<false>;
13
+ export type N1a = True<false | true>;
14
+ export type N1b = True<boolean>;
15
+
16
+ // export type N2 = True<true | 10>;
17
+ // export type N2a = True<true | object>;
18
+ // export type N2b = True<true | undefined>;
19
+ // export type N2c = True<true | null>;
20
+ // export type N2d = True<0>;
21
+ // export type N2e = True<1>;
22
+ // export type N2f = True<number>;
23
+ // export type N2g = True<"">;
24
+ // export type N2h = True<"true">;
25
+ // export type N2i = True<"foo">;
26
+ // export type N2j = True<null>;
27
+ // export type N2k = True<undefined>;
28
+ // export type N2l = True<[]>;
29
+ // export type N2m = True<object>;
30
+ }
@@ -0,0 +1,35 @@
1
+ declare type Numbered<N extends number> = Primeval<N, number>;
2
+
3
+ declare namespace Numbered {
4
+ export type T0 = Numbered<0>;
5
+ export type T1 = Numbered<0.0>;
6
+ export type T2 = Numbered<1>;
7
+ export type T3 = Numbered<1.0>;
8
+ export type T4 = Numbered<1.1>;
9
+ export type T5 = Numbered<1 | 5>;
10
+ }
11
+
12
+ declare namespace NumberedNever {
13
+ export type N0 = Numbered<number>;
14
+ export type N0b = Numbered<numberful>;
15
+ export type N0c = Numbered<number | numberful>;
16
+ export type N0d = Numbered<1 | numberful>;
17
+ export type N1 = Numbered<never>;
18
+
19
+ // export type N0e = Numbered<1 | number>;
20
+ // export type N2 = Numbered<"cool">;
21
+ // export type N3 = Numbered<"NaN">;
22
+ // export type N4 = Numbered<"5">;
23
+ // export type N5 = Numbered<string>;
24
+ // export type N6 = Numbered<boolean>;
25
+ // export type N6a = Numbered<true>;
26
+ // export type N6b = Numbered<false>;
27
+ // export type N7 = Numbered<null>;
28
+ // export type N8 = Numbered<undefined>;
29
+ // export type N9 = Numbered<void>;
30
+ // export type N10 = Numbered<object>;
31
+ // export type N11 = Numbered<[]>;
32
+ // export type N12 = Numbered<5 | true>;
33
+ // export type N13 = Numbered<()=> 5>;
34
+ // export type N14 = Numbered<symbol>;
35
+ }
@@ -0,0 +1,22 @@
1
+ declare type literal<S extends string> = Primeval<S, string>;
2
+
3
+ declare namespace literal {
4
+ export type T = literal<"">;
5
+ export type T0 = literal<"a">;
6
+ export type T1 = literal<"a" | "b">;
7
+ export type T1b = literal<"a" | "">;
8
+ }
9
+
10
+ declare namespace Notliteral {
11
+ export type N = literal<never>;
12
+ export type N0 = literal<string>;
13
+
14
+ // export type N1 = literal<unknown>;
15
+ // export type N2 = literal<null>;
16
+ // export type N3 = literal<undefined>;
17
+ // export type N4 = literal<void>;
18
+ // export type N5 = literal<object>;
19
+ // export type N6 = literal<()=> "a">;
20
+ // export type N7 = literal<symbol>;
21
+ // export type N8 = literal<"a" | 5>;
22
+ }
@@ -0,0 +1,28 @@
1
+ declare type literalful<S extends string> = "" extends literal<S>
2
+ ? never
3
+ : literal<S>;
4
+
5
+ declare namespace literalful {
6
+ export type T0 = literalful<"a">;
7
+ export type T1 = literalful<"a" | "b">;
8
+ }
9
+
10
+ declare namespace Notliteralful {
11
+
12
+ export type N0 = literalful<never>;
13
+ export type N1 = literalful<"">;
14
+ export type N2 = literalful<string>;
15
+ export type N2b = literalful<stringful>;
16
+ export type N3 = literalful<"" | "a">;
17
+
18
+ // export type N5 = literalful<"a" | string>;
19
+ // export type N5a = literalful<unknown>;
20
+ // export type N5b = literalful<null>;
21
+ // export type N5c = literalful<undefined>;
22
+ // export type N5d = literalful<void>;
23
+ // export type N5e = literalful<[]>;
24
+ // export type N5f = literalful<object>;
25
+ // export type N5g = literalful<()=> "a">;
26
+ // export type N5h = literalful<symbol>;
27
+ // export type N5i = literalful<"a" | 5>;
28
+ }