@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
package/dist/symbol.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- /*******************************************************************************
2
- Copyright (c) 2023-2024. 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
- ******************************************************************************/
7
1
  import type { PossibleJavascriptSymbolName, PossibleTypescriptSymbolName } from "./string";
8
2
  /** A type-alias for an official Javascript {@link Symbol} as a primitive */
9
3
  export type JavascriptSymbol<T extends PossibleJavascriptSymbolName = PossibleJavascriptSymbolName> = typeof Symbol[T];
@@ -1 +1 @@
1
- {"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAAA;;;;;gFAKgF;AAEhF,OAAO,KAAK,EAAC,4BAA4B,EAAE,4BAA4B,EAAC,MAAM,UAAU,CAAA;AAExF,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,4BAA4B,GAAG,4BAA4B,IAAM,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;AACxH,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,4BAA4B,GAAG,4BAA4B,IAAM,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;AAExH;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAQ,CAAC,GAAG,MAAM,CAAA;AACtE;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAQ,CAAC,GAAG,MAAM,CAAA;AACpG;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAQ,CAAC,GAAG,MAAM,CAAA"}
1
+ {"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../src/symbol.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,4BAA4B,EAAE,4BAA4B,EAAC,MAAM,UAAU,CAAA;AAExF,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,4BAA4B,GAAG,4BAA4B,IAAM,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;AACxH,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,4BAA4B,GAAG,4BAA4B,IAAM,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;AAExH;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAQ,CAAC,GAAG,MAAM,CAAA;AACtE;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAQ,CAAC,GAAG,MAAM,CAAA;AACpG;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAQ,CAAC,GAAG,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@joookiwi/type",
3
- "version": "1.0.0",
4
- "description": "A typescript project to encapsulate a bunch of common type-aliases",
3
+ "version": "1.2.0",
4
+ "description": "A typescript project to encapsulate a bunch of common type-aliases and centralized declarations",
5
5
 
6
6
  "scripts": {
7
7
  "clear-dist-folder": "del-cli dist/",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "repository": {
36
36
  "type": "git",
37
- "url": "git+https://github.com/joooKiwi/types.git"
37
+ "url": "git+https://github.com/joooKiwi/type.git"
38
38
  },
39
39
  "bugs": {
40
- "url": "https://github.com/joooKiwi/types/issues"
40
+ "url": "https://github.com/joooKiwi/type/issues"
41
41
  },
42
42
 
43
43
  "keywords": [
@@ -50,7 +50,10 @@
50
50
  "empty types",
51
51
  "number types",
52
52
  "numeric types",
53
- "string types"
53
+ "string types",
54
+ "array types",
55
+ "set types",
56
+ "map types"
54
57
  ],
55
58
  "funding": [
56
59
  { "type": "github", "url": "https://github.com/sponsors/joooKiwi" },
@@ -59,7 +62,7 @@
59
62
  "author": "JóôòKiwi",
60
63
  "license": "MIT",
61
64
  "devDependencies": {
62
- "del-cli": "^5.1.0",
63
- "typescript": "^5.4.2"
65
+ "del-cli": "^6.0.0",
66
+ "typescript": "^5.7.3"
64
67
  }
65
68
  }
@@ -1,9 +1,14 @@
1
- /*******************************************************************************
2
- Copyright (c) 2023-2024. 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
- ******************************************************************************/
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
+ //··························································
7
12
 
8
13
  /** A type-alias for the {@link Boolean} <b>false</b> as a primitive */
9
14
  export type False<T extends false = false, > = T
@@ -12,7 +17,6 @@ export type False<T extends false = false, > = T
12
17
  * A type-alias for the {@link Boolean} <b>false</b>
13
18
  * in a {@link String} template
14
19
  *
15
- * @see False
16
20
  * @see Template
17
21
  * @see BooleanTemplate
18
22
  */
@@ -22,8 +26,8 @@ export type FalseTemplate<T extends false = false, > = `${T}`
22
26
  * A type-alias for the {@link Boolean} <b>false</b>
23
27
  * as a primitive or in a {@link String} template
24
28
  *
25
- * @see False
26
29
  * @see Template
30
+ * @see FalseTemplate
27
31
  * @see FalseOrTemplateOrObject
28
32
  * @see TemplateOrBoolean
29
33
  */
@@ -1,9 +1,14 @@
1
- /*******************************************************************************
2
- Copyright (c) 2023-2024. 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
- ******************************************************************************/
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
+ //··························································
7
12
 
8
13
  /** A type-alias for the {@link Boolean} <b>true</b> as a primitive */
9
14
  export type True<T extends true = true, > = T
@@ -12,7 +17,6 @@ export type True<T extends true = true, > = T
12
17
  * A type-alias for the {@link Boolean} <b>true</b>
13
18
  * in a {@link String} template
14
19
  *
15
- * @see True
16
20
  * @see Template
17
21
  * @see BooleanTemplate
18
22
  */
@@ -22,7 +26,6 @@ export type TrueTemplate<T extends true = true, > = `${T}`
22
26
  * A type-alias for the {@link Boolean} <b>true</b>
23
27
  * in a {@link String} template
24
28
  *
25
- * @see True
26
29
  * @see Template
27
30
  * @see TrueTemplate
28
31
  * @see TrueOrTemplateOrObject
package/src/boolean.ts CHANGED
@@ -1,9 +1,14 @@
1
- /*******************************************************************************
2
- Copyright (c) 2023-2024. 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
- ******************************************************************************/
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
+ //··························································
7
12
 
8
13
  /**
9
14
  * A type-alias for a {@link Boolean}
@@ -0,0 +1,74 @@
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 ReadonlyArray Array} of {@link Boolean}
18
+ *
19
+ * @see import('collection').Array
20
+ */
21
+ export type BooleanArray<T extends boolean = boolean, > = readonly T[]
22
+
23
+ /**
24
+ * A type-alias for an {@link ReadonlyArray Array} of {@link Number} or {@link BigInt}
25
+ *
26
+ * @see import('collection').Array
27
+ * @see NumberArray
28
+ * @see BigIntArray
29
+ */
30
+ export type NumericArray<T extends Numeric = Numeric, > = readonly T[]
31
+ /**
32
+ * A type-alias for an {@link ReadonlyArray Array} of {@link Number}
33
+ *
34
+ * @see import('collection').Array
35
+ * @see NumericArray
36
+ */
37
+ export type NumberArray<T extends number = number, > = readonly T[]
38
+ /**
39
+ * A type-alias for an {@link ReadonlyArray Array} of {@link BigInt}
40
+ *
41
+ * @see import('collection').Array
42
+ * @see NumericArray
43
+ */
44
+ export type BigIntArray<T extends bigint = bigint, > = readonly T[]
45
+
46
+ /**
47
+ * A type-alias for an {@link ReadonlyArray Array} of {@link String}
48
+ *
49
+ * @see import('collection').Array
50
+ */
51
+ export type StringArray<T extends string = string, > = readonly T[]
52
+
53
+ /**
54
+ * A type-alias for an {@link ReadonlyArray Array} of {@link Symbol}
55
+ *
56
+ * @see import('collection').Array
57
+ * @see JavascriptSymbolArray
58
+ * @see TypescriptSymbolArray
59
+ */
60
+ export type SymbolArray<T extends symbol = symbol, > = readonly T[]
61
+ /**
62
+ * A type-alias for an {@link ReadonlyArray Array} of the official Javascript {@link Symbol}
63
+ *
64
+ * @see import('collection').Array
65
+ * @see SymbolArray
66
+ */
67
+ export type JavascriptSymbolArray<T extends JavascriptSymbol = JavascriptSymbol, > = readonly T[]
68
+ /**
69
+ * A type-alias for an {@link ReadonlyArray Array} of the official Typescript {@link Symbol}
70
+ *
71
+ * @see import('collection').Array
72
+ * @see SymbolArray
73
+ */
74
+ export type TypescriptSymbolArray<T extends TypescriptSymbol = TypescriptSymbol, > = readonly T[]