@joookiwi/type 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/boolean (false).d.ts +1 -8
  2. package/dist/boolean (false).d.ts.map +1 -1
  3. package/dist/boolean (true).d.ts +0 -8
  4. package/dist/boolean (true).d.ts.map +1 -1
  5. package/dist/boolean.d.ts +0 -6
  6. package/dist/boolean.d.ts.map +1 -1
  7. package/dist/collection (array).d.ts +59 -0
  8. package/dist/collection (array).d.ts.map +1 -0
  9. package/dist/collection (map).d.ts +786 -0
  10. package/dist/collection (map).d.ts.map +1 -0
  11. package/dist/collection (mutable array).d.ts +59 -0
  12. package/dist/collection (mutable array).d.ts.map +1 -0
  13. package/dist/collection (mutable map).d.ts +786 -0
  14. package/dist/collection (mutable map).d.ts.map +1 -0
  15. package/dist/collection (mutable set).d.ts +59 -0
  16. package/dist/collection (mutable set).d.ts.map +1 -0
  17. package/dist/collection (set).d.ts +59 -0
  18. package/dist/collection (set).d.ts.map +1 -0
  19. package/dist/collection.d.ts +446 -0
  20. package/dist/collection.d.ts.map +1 -0
  21. package/dist/empty.d.ts +50 -14
  22. package/dist/empty.d.ts.map +1 -1
  23. package/dist/index.d.ts +7 -6
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/mixed.d.ts +0 -6
  26. package/dist/mixed.d.ts.map +1 -1
  27. package/dist/nullable.d.ts +22 -6
  28. package/dist/nullable.d.ts.map +1 -1
  29. package/dist/numeric (-1).d.ts +0 -17
  30. package/dist/numeric (-1).d.ts.map +1 -1
  31. package/dist/numeric (0).d.ts +2 -19
  32. package/dist/numeric (0).d.ts.map +1 -1
  33. package/dist/numeric (1).d.ts +2 -19
  34. package/dist/numeric (1).d.ts.map +1 -1
  35. package/dist/numeric (2).d.ts +2 -19
  36. package/dist/numeric (2).d.ts.map +1 -1
  37. package/dist/numeric (bigint).d.ts +0 -6
  38. package/dist/numeric (bigint).d.ts.map +1 -1
  39. package/dist/numeric (number).d.ts +0 -6
  40. package/dist/numeric (number).d.ts.map +1 -1
  41. package/dist/numeric.d.ts +0 -10
  42. package/dist/numeric.d.ts.map +1 -1
  43. package/dist/string (individual).d.ts +4 -6
  44. package/dist/string (individual).d.ts.map +1 -1
  45. package/dist/string.d.ts +0 -6
  46. package/dist/string.d.ts.map +1 -1
  47. package/dist/symbol.d.ts +0 -6
  48. package/dist/symbol.d.ts.map +1 -1
  49. package/package.json +10 -7
  50. package/src/boolean (false).ts +12 -8
  51. package/src/boolean (true).ts +11 -8
  52. package/src/boolean.ts +11 -6
  53. package/src/collection (array).ts +74 -0
  54. package/src/collection (map).ts +838 -0
  55. package/src/collection (mutable array).ts +75 -0
  56. package/src/collection (mutable map).ts +838 -0
  57. package/src/collection (mutable set).ts +74 -0
  58. package/src/collection (set).ts +74 -0
  59. package/src/collection.ts +482 -0
  60. package/src/empty.ts +61 -14
  61. package/src/index.ts +18 -6
  62. package/src/mixed.ts +11 -6
  63. package/src/nullable.ts +37 -6
  64. package/src/numeric (-1).ts +11 -17
  65. package/src/numeric (0).ts +13 -19
  66. package/src/numeric (1).ts +13 -19
  67. package/src/numeric (2).ts +13 -19
  68. package/src/numeric (bigint).ts +11 -6
  69. package/src/numeric (number).ts +11 -6
  70. package/src/numeric.ts +11 -10
  71. package/src/string (individual).ts +15 -6
  72. package/src/string.ts +11 -6
  73. package/src/symbol.ts +11 -6
@@ -0,0 +1,75 @@
1
+ //··························································
2
+ // Copyright (c) 2023-2025. Jonathan Bédard ~ JóôòKiwi
3
+ //
4
+ // This project is free to use.
5
+ // All the right is reserved to the author of this project.
6
+ // My projects:
7
+ // - https://github.com/joooKiwi/type
8
+ // - https://github.com/joooKiwi/lazy
9
+ // - https://github.com/joooKiwi/collection
10
+ // - https://github.com/joooKiwi/enumeration
11
+ //··························································
12
+
13
+ import type {Numeric} from "./numeric"
14
+ import type {JavascriptSymbol, TypescriptSymbol} from "./symbol"
15
+
16
+ /**
17
+ * A type-alias for an {@link Array MutableArray} of {@link Boolean}
18
+ *
19
+ * @see MutableArray
20
+ */
21
+ export type MutableBooleanArray<T extends boolean = boolean, > = readonly T[]
22
+
23
+ /**
24
+ * A type-alias for an {@link Array MutableArray} of {@link Number} or {@link BigInt}
25
+ *
26
+ * @see MutableArray
27
+ * @see MutableNumberArray
28
+ * @see MutableBigIntArray
29
+ */
30
+ export type MutableNumericArray<T extends Numeric = Numeric, > = readonly T[]
31
+ /**
32
+ * A type-alias for an {@link Array MutableArray} of {@link Number}
33
+ *
34
+ * @see MutableArray
35
+ * @see MutableNumericArray
36
+ */
37
+ export type MutableNumberArray<T extends number = number, > = readonly T[]
38
+ /**
39
+ * A type-alias for an {@link Array MutableArray} of {@link BigInt}
40
+ *
41
+ * @see MutableArray
42
+ * @see MutableNumericArray
43
+ */
44
+ export type MutableBigIntArray<T extends bigint = bigint, > = readonly T[]
45
+
46
+ /**
47
+ * A type-alias for an {@link Array MutableArray} of {@link String}
48
+ *
49
+ * @see MutableArray
50
+ */
51
+ export type MutableStringArray<T extends string = string, > = readonly T[]
52
+
53
+ /**
54
+ * A type-alias for an {@link Array MutableArray} of {@link Symbol}
55
+ *
56
+ * @see MutableArray
57
+ * @see MutableJavascriptSymbolArray
58
+ * @see MutableTypescriptSymbolArray
59
+ */
60
+ export type MutableSymbolArray<T extends symbol = symbol, > = readonly T[]
61
+ /**
62
+ * A type-alias for an {@link Array MutableArray} of the official Javascript {@link Symbol}
63
+ *
64
+ * @see MutableArray
65
+ * @see MutableSymbolArray
66
+ */
67
+ export type MutableJavascriptSymbolArray<T extends JavascriptSymbol = JavascriptSymbol, > = readonly T[]
68
+ /**
69
+ * A type-alias for an {@link Array MutableArray} of the official Typescript {@link Symbol}
70
+ *
71
+ * @see MutableArray
72
+ * @see MutableSymbolArray
73
+ */
74
+ export type MutableTypescriptSymbolArray<T extends TypescriptSymbol = TypescriptSymbol, > = readonly T[]
75
+