@eslinted/core 10.0.2 → 10.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/dist/factory/options/option/index.d.ts +7 -5
  2. package/dist/factory/options/option/index.d.ts.map +1 -1
  3. package/dist/factory/options/option/template/language/index.d.ts +2 -2
  4. package/dist/factory/options/option/template/language/index.d.ts.map +1 -1
  5. package/package.json +2 -2
  6. package/src/factory/options/option/template/language/index.ts +2 -2
  7. package/typings/common/literals/chars/alpha.d.ts +4 -0
  8. package/typings/common/literals/{string/letter/digit/extended/base64/index.d.ts → chars/digits/base64.d.ts} +1 -1
  9. package/typings/common/literals/chars/lower.d.ts +1 -0
  10. package/typings/common/literals/{string/letter/index.d.ts → chars/upper.d.ts} +0 -7
  11. package/typings/common/literals/{number/bases → numbers}/base32.d.ts +1 -1
  12. package/typings/common/literals/{number/bases/hex.d.ts → numbers/hexadecimal.d.ts} +1 -1
  13. package/typings/common/tester.d.ts +8 -0
  14. package/typings/common/utility/interface/identity.d.ts +11 -0
  15. package/typings/common/utility/interface/{identity/interface/index.d.ts → identity.spec.d.ts} +1 -18
  16. package/typings/common/utility/interface/keys.d.ts +3 -0
  17. package/typings/common/utility/interface/{identity/keys/index.d.ts → keys.spec.d.ts} +1 -5
  18. package/typings/common/utility/interface/optional.d.ts +7 -0
  19. package/typings/common/utility/interface/{transform/partial/unrequire/index.d.ts → optional.spec.d.ts} +4 -15
  20. package/typings/common/utility/interface/partially.d.ts +1 -0
  21. package/typings/common/utility/interface/{build/properties/property → property}/index.d.ts +2 -2
  22. package/typings/common/utility/interface/property/properties.d.ts +6 -0
  23. package/typings/common/utility/interface/table/tables.d.ts +5 -0
  24. package/typings/common/utility/iterable/arrayful.d.ts +1 -0
  25. package/typings/common/utility/iterable/{transform/flat/unflat/index.d.ts → flat/unflat.d.ts} +1 -1
  26. package/typings/common/utility/iterable/identity.d.ts +1 -0
  27. package/typings/common/utility/iterable/identity.spec.d.ts +59 -0
  28. package/typings/common/utility/iterable/{build/arrays/array/index.d.ts → index.d.ts} +7 -3
  29. package/typings/common/utility/iterable/index.spec.d.ts +18 -0
  30. package/typings/common/utility/iterable/tuple.d.ts +11 -0
  31. package/typings/common/utility/iterable/{build/tuples/tuple/index.d.ts → tuple.spec.d.ts} +0 -12
  32. package/typings/common/utility/{nullable/null → null}/index.spec.d.ts +2 -2
  33. package/typings/common/utility/{nullable/index.spec.d.ts → null/nullable.spec.d.ts} +1 -1
  34. package/typings/common/utility/primitive/index.d.ts +1 -32
  35. package/typings/common/utility/primitive/index.spec.d.ts +27 -0
  36. package/typings/common/utility/primitive/length.d.ts +5 -0
  37. package/typings/common/utility/primitive/{number/length/index.d.ts → length.spec.d.ts} +1 -10
  38. package/typings/common/utility/primitive/literal.d.ts +1 -0
  39. package/typings/common/utility/primitive/{string/literalful/literal/index.d.ts → literal.spec.d.ts} +0 -5
  40. package/typings/common/utility/primitive/literalful.d.ts +3 -0
  41. package/typings/common/utility/primitive/{string/literalful/index.d.ts → literalful.spec.d.ts} +0 -8
  42. package/typings/common/utility/primitive/numeric.d.ts +1 -0
  43. package/typings/common/utility/primitive/numeric.spec.d.ts +30 -0
  44. package/typings/common/utility/primitive/truth.d.ts +3 -0
  45. package/typings/common/utility/primitive/{boolean/true/index.d.ts → truth.spec.d.ts} +6 -14
  46. package/typings/common/validated/index.d.ts +2 -0
  47. package/typings/common/validated/numberful.d.ts +1 -0
  48. package/typings/common/validated/properties/finite.d.ts +2 -0
  49. package/typings/common/validated/properties/length.d.ts +3 -0
  50. package/typings/common/validated/properties/polarity.d.ts +5 -0
  51. package/typings/common/validated/stringful.d.ts +1 -0
  52. package/typings/common/safe/index.d.ts +0 -2
  53. package/typings/common/safe/numbers/finite/index.d.ts +0 -2
  54. package/typings/common/safe/numbers/fint.d.ts +0 -1
  55. package/typings/common/safe/numbers/integer/numberful/index.d.ts +0 -1
  56. package/typings/common/safe/numbers/polarity/negative.d.ts +0 -4
  57. package/typings/common/safe/numbers/polarity/pole/index.d.ts +0 -18
  58. package/typings/common/safe/numbers/polarity/positive.d.ts +0 -4
  59. package/typings/common/safe/strings/stringful/index.d.ts +0 -1
  60. package/typings/common/safe/strings/stringful/length/index.d.ts +0 -3
  61. package/typings/common/utility/interface/build/particord/index.d.ts +0 -1
  62. package/typings/common/utility/interface/build/properties/Field.d.ts +0 -1
  63. package/typings/common/utility/interface/build/properties/Flag.d.ts +0 -1
  64. package/typings/common/utility/interface/build/properties/Limit.d.ts +0 -8
  65. package/typings/common/utility/interface/build/properties/List.d.ts +0 -1
  66. package/typings/common/utility/interface/build/properties/Listish.d.ts +0 -1
  67. package/typings/common/utility/interface/build/properties/Scalar.d.ts +0 -1
  68. package/typings/common/utility/interface/build/tables/FieldTable.d.ts +0 -1
  69. package/typings/common/utility/interface/build/tables/FlagTable.d.ts +0 -1
  70. package/typings/common/utility/interface/build/tables/ListTable.d.ts +0 -1
  71. package/typings/common/utility/interface/build/tables/ListishTable.d.ts +0 -1
  72. package/typings/common/utility/interface/build/tables/ScalarTable.d.ts +0 -1
  73. package/typings/common/utility/iterable/build/arrays/index.d.ts +0 -2
  74. package/typings/common/utility/iterable/identity/array/index.d.ts +0 -65
  75. package/typings/common/utility/iterable/identity/array/length/index.d.ts +0 -16
  76. package/typings/common/utility/iterable/identity/dyad.d.ts +0 -3
  77. package/typings/common/utility/iterable/identity/monad.d.ts +0 -48
  78. package/typings/common/utility/iterable/identity/triad.d.ts +0 -3
  79. package/typings/common/utility/iterable/transform/string/index.d.ts +0 -30
  80. package/typings/common/utility/iterable/transform/string/stringify/index.d.ts +0 -27
  81. package/typings/common/utility/primitive/number/length/numbered/index.d.ts +0 -35
  82. package/typings/common/utility/primitive/string/fake/index.d.ts +0 -1
  83. package/typings/common/utility/test.d.ts +0 -2
  84. package/typings/common/valid/index.d.ts +0 -7
  85. package/typings/common/valid/string/index.d.ts +0 -1
  86. /package/typings/common/literals/{string/letter/digit/index.d.ts → chars/digit.d.ts} +0 -0
  87. /package/typings/common/literals/{string/letter/digit/extended/hex/index.d.ts → chars/digits/hexchar.d.ts} +0 -0
  88. /package/typings/common/literals/{number/bases → numbers}/base64.d.ts +0 -0
  89. /package/typings/common/literals/{number/bases → numbers}/binary.d.ts +0 -0
  90. /package/typings/common/literals/{number/bases → numbers}/decimal.d.ts +0 -0
  91. /package/typings/common/literals/{number/bases → numbers}/octal.d.ts +0 -0
  92. /package/typings/common/literals/{number/bases → numbers}/quatral.d.ts +0 -0
  93. /package/typings/common/literals/{number/bases → numbers}/ternary.d.ts +0 -0
  94. /package/typings/common/{primitive/index.d.ts → primitive.d.ts} +0 -0
  95. /package/typings/common/utility/{object/build/index.d.ts → constructor.d.ts} +0 -0
  96. /package/typings/common/utility/interface/{build/recordful/index.d.ts → index.d.ts} +0 -0
  97. /package/typings/common/utility/interface/{build/tables/table → table}/index.d.ts +0 -0
  98. /package/typings/common/utility/iterable/{transform/flat → flat}/index.d.ts +0 -0
  99. /package/typings/common/utility/iterable/{build/tuples/index.d.ts → tuples.d.ts} +0 -0
  100. /package/typings/common/utility/{nullable/null → null}/index.d.ts +0 -0
  101. /package/typings/common/utility/{nullable/index.d.ts → null/nullable.d.ts} +0 -0
  102. /package/typings/common/{safe/strings → validated}/char.d.ts +0 -0
  103. /package/typings/common/{safe/numbers/integer/index.d.ts → validated/properties/int.d.ts} +0 -0
@@ -0,0 +1,3 @@
1
+ declare type literalful<S extends string> = "" extends literal<S>
2
+ ? never
3
+ : literal<S>;
@@ -1,14 +1,6 @@
1
- declare type literalful<S extends string> = "" extends literal<S>
2
- ? never
3
- : literal<S>;
4
-
5
1
  declare namespace literalful {
6
2
  export type T0 = literalful<"a">;
7
3
  export type T1 = literalful<"a" | "b">;
8
- }
9
-
10
- declare namespace Notliteralful {
11
-
12
4
  export type N0 = literalful<never>;
13
5
  export type N1 = literalful<"">;
14
6
  export type N2 = literalful<string>;
@@ -0,0 +1 @@
1
+ declare type Numeric<N extends number> = Primitive<N, number>;
@@ -0,0 +1,30 @@
1
+ declare namespace Numeric {
2
+ export type T0 = Numeric<0>;
3
+ export type T1 = Numeric<0.0>;
4
+ export type T2 = Numeric<1>;
5
+ export type T3 = Numeric<1.0>;
6
+ export type T4 = Numeric<1.1>;
7
+ export type T5 = Numeric<1 | 5>;
8
+ export type N0 = Numeric<number>;
9
+ export type N0b = Numeric<numberful>;
10
+ export type N0c = Numeric<number | numberful>;
11
+ export type N0d = Numeric<1 | numberful>;
12
+ export type N1 = Numeric<never>;
13
+
14
+ // export type N0e = Numbered<1 | number>;
15
+ // export type N2 = Numbered<"cool">;
16
+ // export type N3 = Numbered<"NaN">;
17
+ // export type N4 = Numbered<"5">;
18
+ // export type N5 = Numbered<string>;
19
+ // export type N6 = Numbered<boolean>;
20
+ // export type N6a = Numbered<true>;
21
+ // export type N6b = Numbered<false>;
22
+ // export type N7 = Numbered<null>;
23
+ // export type N8 = Numbered<undefined>;
24
+ // export type N9 = Numbered<void>;
25
+ // export type N10 = Numbered<object>;
26
+ // export type N11 = Numbered<[]>;
27
+ // export type N12 = Numbered<5 | true>;
28
+ // export type N13 = Numbered<() => 5>;
29
+ // export type N14 = Numbered<symbol>;
30
+ }
@@ -0,0 +1,3 @@
1
+ declare type Truth<B extends boolean> = true extends Primitive<B, boolean>
2
+ ? Primitive<B, boolean>
3
+ : never;
@@ -1,17 +1,9 @@
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>;
1
+ declare namespace Truth {
2
+ export type T0 = Truth<true>;
3
+ export type N0 = Truth<never>;
4
+ export type N1 = Truth<false>;
5
+ export type N1a = Truth<false | true>;
6
+ export type N1b = Truth<boolean>;
15
7
 
16
8
  // export type N2 = True<true | 10>;
17
9
  // export type N2a = True<true | object>;
@@ -0,0 +1,2 @@
1
+ declare const ful: unique symbol;
2
+ declare type Full<Type extends primitive, Brand> = Type & { [ful]: Brand };
@@ -0,0 +1 @@
1
+ declare type numberful = Full<number, "!NaN">;
@@ -0,0 +1,2 @@
1
+ declare const finite: unique symbol;
2
+ declare type finite<NumberType extends number = numberful> = NumberType & { [finite]: true };
@@ -0,0 +1,3 @@
1
+ declare type StringLength<Length extends number> = LengthValue<Length> extends never
2
+ ? never
3
+ : { length: LengthValue<Length> };
@@ -0,0 +1,5 @@
1
+ declare const polarity: unique symbol;
2
+ declare type polarity<
3
+ P extends "-" | "+" = "+",
4
+ NumberType extends number = numberful,
5
+ > = NumberType & { [polarity]: P };
@@ -0,0 +1 @@
1
+ declare type stringful = Full<string, "length > 0"> & { 0: char };
@@ -1,2 +0,0 @@
1
- declare const p: unique symbol;
2
- declare type Safe<P extends primitive, Check> = P & { [p]: Check };
@@ -1,2 +0,0 @@
1
- declare const finite: unique symbol;
2
- declare type finite<N extends number = numberful> = N & { [finite]: true };
@@ -1 +0,0 @@
1
- declare type fint = finite<int>;
@@ -1 +0,0 @@
1
- declare type numberful = Safe<number, "numberful">;
@@ -1,4 +0,0 @@
1
- declare type Negative<
2
- N extends number = numberful,
3
- Zero = true,
4
- > = pole<"-", N, Zero>;
@@ -1,18 +0,0 @@
1
- declare const pole: unique symbol,
2
- min: unique symbol;
3
- declare type pole<
4
- P extends
5
- | "-"
6
- | "+"
7
- ,
8
- N extends number,
9
- Zero,
10
- > =
11
- & N
12
- & {
13
- [pole]: P;
14
- [min]: Zero extends false
15
- ? P extends "+" ? 1 : -1
16
- : 0;
17
- }
18
- ;
@@ -1,4 +0,0 @@
1
- declare type Positive<
2
- N extends number = numberful,
3
- Zero = true,
4
- > = pole<"+", N, Zero>;
@@ -1 +0,0 @@
1
- declare type stringful = Safe<string, "stringful"> & { 0: stringful & StringLength<1> };
@@ -1,3 +0,0 @@
1
- declare type StringLength<L extends number> = LengthValue<L> extends never
2
- ? never
3
- : { length: LengthValue<L> };
@@ -1 +0,0 @@
1
- declare type Particord<K extends string, V> = Partial<Recordful<K, V>>;
@@ -1 +0,0 @@
1
- declare type Field<K extends string, OK extends string = never> = Property<K, OK, string>;
@@ -1 +0,0 @@
1
- declare type Flag<OK extends string, K extends string = never> = Property<K, OK, boolean>;
@@ -1,8 +0,0 @@
1
- declare type Limit<K extends string, OK extends string = never> = Property<K, OK, Boundary>;
2
-
3
- type Boundary = Recordful<
4
- | "min"
5
- | "max"
6
- ,
7
- number
8
- >;
@@ -1 +0,0 @@
1
- declare type List<K extends string, OK extends string = never> = Property<K, OK, readonly string[]>;
@@ -1 +0,0 @@
1
- declare type Listish<K extends string, OK extends string = never> = Property<K, OK, Unflat>;
@@ -1 +0,0 @@
1
- declare type Scalar<K extends string, OK extends string = never> = Property<K, OK, number>;
@@ -1 +0,0 @@
1
- declare type FieldTable = Table<string>;
@@ -1 +0,0 @@
1
- declare type FlagTable = Table<boolean>;
@@ -1 +0,0 @@
1
- declare type ListTable = Table<readonly string[]>;
@@ -1 +0,0 @@
1
- declare type ListishTable = Table<Unflat>;
@@ -1 +0,0 @@
1
- declare type ScalarTable = Table<number>;
@@ -1,2 +0,0 @@
1
- declare type Arrayful<I = string> = ArrayN<1, I>;
2
- declare type Arrayfully<I = string> = ArrayN<2, I>;
@@ -1,65 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
1
- declare type ArrayLength<A extends readonly unknown[]> = LengthValue<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
- }
@@ -1,3 +0,0 @@
1
- declare type DyadType<A extends readonly unknown[]> = 1 extends ArrayLength<A>
2
- ? never
3
- : MonadType<A>;
@@ -1,48 +0,0 @@
1
- declare type MonadType<A extends readonly unknown[]> = 0 extends ArrayLength<A>
2
- ? never
3
- : ArrayType<A>;
4
-
5
- declare namespace MonadType {
6
- export type T0 = MonadType<[1, 1]>;
7
- export type T1 = MonadType<readonly [1, 1]>;
8
- export type T2 = MonadType<readonly [1, 1?]>;
9
- export type T3 = MonadType<readonly [1?, 1?]>;
10
- export type T4 = MonadType<readonly [1?, 1?]>;
11
- export type T5 = MonadType<[[]]>;
12
- export type T6 = MonadType<string[] | int[]>;
13
- export type T7 = MonadType<(string | int)[]>;
14
- export type T18 = MonadType<[string] | [5, 10]>;
15
- export type T8a = MonadType<Tuple>;
16
- export type T8b = MonadType<ArrayN<3>>;
17
- export type T8c = MonadType<
18
- | ArrayN<3>
19
- | Tuple
20
- | [string]
21
- | [5, 10]
22
- | [5, 13]
23
- | readonly [5, 10]
24
- >;
25
- }
26
-
27
- declare namespace NotMonadType {
28
- export type N12 = MonadType<never>;
29
- export type N26 = MonadType<[]>;
30
- export type N27 = MonadType<string[]>;
31
- export type N28 = MonadType<readonly []>;
32
- export type N29 = MonadType<readonly string[]>;
33
- export type N30 = MonadType<[5] | []>;
34
- export type N30a = MonadType<[5] | string[]>;
35
- export type N30b = MonadType<[5] | readonly []>;
36
- export type N30c = MonadType<[5] | readonly string[]>;
37
- export type N30d = MonadType<
38
- | []
39
- | [5, 10]
40
- | string []
41
- | readonly []
42
- | readonly [5, 10]
43
- | readonly string[]
44
- >;
45
- export type N31 = MonadType<ArrayN>;
46
- export type N32 = MonadType<[string?]>;
47
- export type N33 = MonadType<readonly [string?]>;
48
- }
@@ -1,3 +0,0 @@
1
- declare type TriadType<A extends readonly unknown[]> = 2 extends ArrayLength<A>
2
- ? never
3
- : DyadType<A>;
@@ -1,30 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
1
- declare type Stringify<C> = C extends abstract new (...args: infer A) => infer O
2
- ? O extends { string: infer S extends string }
3
- ? S
4
- : O extends { toString: () => infer S extends string }
5
- ? S
6
- : never
7
- : C extends ((...args: infer A) => infer S extends string)
8
- ? S
9
- : C extends { string: infer S extends string }
10
- ? S
11
- : C extends { toString: () => infer S extends string }
12
- ? S
13
- : never;
14
-
15
- declare namespace Stringify {
16
- export type T = Stringify<CharString<"OK-Instance">>;
17
- export type T0 = Stringify<CharStringCtor>;
18
- export type T1 = Stringify<charstringfunc<"OK-Function">>;
19
-
20
- type CharStringCtor = abstract new () => CharString<"OK-Constructor">;
21
-
22
- interface CharString<Validator extends string> {
23
- readonly string: valid<stringful, [Validator, "string"]>;
24
- }
25
-
26
- type charstringfunc<Validator extends string> = () => valid<stringful, [Validator, "string"]>;
27
- }
@@ -1,35 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- declare type Fake<T> = T extends string ? string : string;
@@ -1,2 +0,0 @@
1
- declare type Test<TF extends { T: unknown; F?: unknown }> = (OmitNever<TF["T"]> extends TF["T"] ? true : never) & (object extends OmitNever<TF["F"]> ? true : undefined extends OmitNever<TF["F"]> ? true : never);
2
- declare type OmitNever<R> = { [K in keyof R as R[K] extends never ? never : K]: R[K] };
@@ -1,7 +0,0 @@
1
- declare const v: unique symbol;
2
- declare type valid<T, V extends readonly string[]> =
3
- & T
4
- & (Chain<V, ":", true> extends never
5
- ? never
6
- : { [v]: Chain<V, ":", true> })
7
- ;
@@ -1 +0,0 @@
1
- declare type vstring<V extends string> = valid<stringful, [V, "string"]>;