@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.
- package/dist/boolean (false).d.ts +1 -8
- package/dist/boolean (false).d.ts.map +1 -1
- package/dist/boolean (true).d.ts +0 -8
- package/dist/boolean (true).d.ts.map +1 -1
- package/dist/boolean.d.ts +0 -6
- package/dist/boolean.d.ts.map +1 -1
- package/dist/collection (array).d.ts +59 -0
- package/dist/collection (array).d.ts.map +1 -0
- package/dist/collection (map).d.ts +786 -0
- package/dist/collection (map).d.ts.map +1 -0
- package/dist/collection (mutable array).d.ts +59 -0
- package/dist/collection (mutable array).d.ts.map +1 -0
- package/dist/collection (mutable map).d.ts +786 -0
- package/dist/collection (mutable map).d.ts.map +1 -0
- package/dist/collection (mutable set).d.ts +59 -0
- package/dist/collection (mutable set).d.ts.map +1 -0
- package/dist/collection (set).d.ts +59 -0
- package/dist/collection (set).d.ts.map +1 -0
- package/dist/collection.d.ts +446 -0
- package/dist/collection.d.ts.map +1 -0
- package/dist/empty.d.ts +50 -14
- package/dist/empty.d.ts.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/mixed.d.ts +0 -6
- package/dist/mixed.d.ts.map +1 -1
- package/dist/nullable.d.ts +22 -6
- package/dist/nullable.d.ts.map +1 -1
- package/dist/numeric (-1).d.ts +0 -17
- package/dist/numeric (-1).d.ts.map +1 -1
- package/dist/numeric (0).d.ts +2 -19
- package/dist/numeric (0).d.ts.map +1 -1
- package/dist/numeric (1).d.ts +2 -19
- package/dist/numeric (1).d.ts.map +1 -1
- package/dist/numeric (2).d.ts +2 -19
- package/dist/numeric (2).d.ts.map +1 -1
- package/dist/numeric (bigint).d.ts +0 -6
- package/dist/numeric (bigint).d.ts.map +1 -1
- package/dist/numeric (number).d.ts +0 -6
- package/dist/numeric (number).d.ts.map +1 -1
- package/dist/numeric.d.ts +0 -10
- package/dist/numeric.d.ts.map +1 -1
- package/dist/string (individual).d.ts +4 -6
- package/dist/string (individual).d.ts.map +1 -1
- package/dist/string.d.ts +0 -6
- package/dist/string.d.ts.map +1 -1
- package/dist/symbol.d.ts +0 -6
- package/dist/symbol.d.ts.map +1 -1
- package/package.json +10 -7
- package/src/boolean (false).ts +12 -8
- package/src/boolean (true).ts +11 -8
- package/src/boolean.ts +11 -6
- package/src/collection (array).ts +74 -0
- package/src/collection (map).ts +838 -0
- package/src/collection (mutable array).ts +75 -0
- package/src/collection (mutable map).ts +838 -0
- package/src/collection (mutable set).ts +74 -0
- package/src/collection (set).ts +74 -0
- package/src/collection.ts +482 -0
- package/src/empty.ts +61 -14
- package/src/index.ts +18 -6
- package/src/mixed.ts +11 -6
- package/src/nullable.ts +37 -6
- package/src/numeric (-1).ts +11 -17
- package/src/numeric (0).ts +13 -19
- package/src/numeric (1).ts +13 -19
- package/src/numeric (2).ts +13 -19
- package/src/numeric (bigint).ts +11 -6
- package/src/numeric (number).ts +11 -6
- package/src/numeric.ts +11 -10
- package/src/string (individual).ts +15 -6
- package/src/string.ts +11 -6
- 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
|
+
|