@oscarpalmer/atoms 0.75.0 → 0.76.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/js/array/chunk.cjs +2 -1
- package/dist/js/array/chunk.js +2 -1
- package/dist/js/array/count.cjs +10 -3
- package/dist/js/array/count.js +10 -3
- package/dist/js/array/exists.cjs +10 -3
- package/dist/js/array/exists.js +10 -3
- package/dist/js/array/filter.cjs +10 -3
- package/dist/js/array/filter.js +10 -3
- package/dist/js/array/find.cjs +10 -3
- package/dist/js/array/find.js +10 -3
- package/dist/js/array/group-by.cjs +18 -16
- package/dist/js/array/group-by.js +18 -16
- package/dist/js/array/index-of.cjs +10 -3
- package/dist/js/array/index-of.js +10 -3
- package/dist/js/array/index.cjs +2 -2
- package/dist/js/array/index.js +2 -2
- package/dist/js/array/insert.cjs +10 -4
- package/dist/js/array/insert.js +10 -4
- package/dist/js/array/splice.cjs +4 -4
- package/dist/js/array/splice.js +4 -4
- package/dist/js/array/to-map.cjs +11 -11
- package/dist/js/array/to-map.js +11 -11
- package/dist/js/array/to-record.cjs +3 -3
- package/dist/js/array/to-record.js +3 -3
- package/dist/js/array/unique.cjs +2 -2
- package/dist/js/array/unique.js +2 -2
- package/dist/js/colour/base.cjs +1 -1
- package/dist/js/colour/base.js +1 -1
- package/dist/js/colour/hex.cjs +2 -2
- package/dist/js/colour/hex.js +2 -2
- package/dist/js/colour/hsl.cjs +13 -7
- package/dist/js/colour/hsl.js +13 -7
- package/dist/js/colour/rgb.cjs +12 -6
- package/dist/js/colour/rgb.js +12 -6
- package/dist/js/emitter.cjs +8 -5
- package/dist/js/emitter.js +8 -5
- package/dist/js/function.cjs +6 -6
- package/dist/js/function.js +6 -6
- package/dist/js/index.cjs +0 -1
- package/dist/js/index.js +1 -2
- package/dist/js/internal/array/callbacks.cjs +23 -0
- package/dist/js/internal/array/callbacks.js +23 -0
- package/dist/js/internal/{array-find.cjs → array/find.cjs} +11 -12
- package/dist/js/internal/{array-find.js → array/find.js} +11 -12
- package/dist/js/logger.cjs +13 -13
- package/dist/js/logger.js +13 -13
- package/dist/js/query.cjs +0 -3
- package/dist/js/query.js +1 -4
- package/dist/js/random.cjs +0 -6
- package/dist/js/random.js +0 -6
- package/dist/js/sized.cjs +1 -1
- package/dist/js/sized.js +1 -1
- package/dist/js/string/index.cjs +7 -1
- package/dist/js/string/index.js +7 -1
- package/dist/js/value/compare.cjs +0 -1
- package/dist/js/value/compare.js +0 -1
- package/dist/js/value/get.cjs +3 -3
- package/dist/js/value/get.js +2 -2
- package/dist/js/value/set.cjs +4 -4
- package/dist/js/value/set.js +2 -2
- package/package.json +3 -2
- package/src/js/array/chunk.ts +6 -5
- package/src/js/array/compact.ts +8 -10
- package/src/js/array/count.ts +39 -19
- package/src/js/array/exists.ts +40 -16
- package/src/js/array/filter.ts +42 -20
- package/src/js/array/find.ts +45 -20
- package/src/js/array/group-by.ts +158 -27
- package/src/js/array/index-of.ts +40 -18
- package/src/js/array/index.ts +10 -9
- package/src/js/array/insert.ts +28 -14
- package/src/js/array/models.ts +18 -15
- package/src/js/array/shuffle.ts +3 -3
- package/src/js/array/sort.ts +28 -34
- package/src/js/array/splice.ts +22 -26
- package/src/js/array/to-map.ts +133 -45
- package/src/js/array/to-record.ts +137 -39
- package/src/js/array/unique.ts +20 -15
- package/src/js/colour/base.ts +3 -3
- package/src/js/colour/functions.ts +4 -6
- package/src/js/colour/hex.ts +5 -5
- package/src/js/colour/hsl.ts +18 -12
- package/src/js/colour/index.ts +1 -1
- package/src/js/colour/is.ts +3 -3
- package/src/js/colour/rgb.ts +17 -11
- package/src/js/emitter.ts +12 -9
- package/src/js/function.ts +12 -12
- package/src/js/index.ts +16 -16
- package/src/js/internal/array/callbacks.ts +33 -0
- package/src/js/internal/{array-find.ts → array/find.ts} +23 -24
- package/src/js/internal/{value-handle.ts → value/handle.ts} +1 -1
- package/src/js/is.ts +2 -2
- package/src/js/logger.ts +14 -14
- package/src/js/math.ts +1 -1
- package/src/js/models.ts +5 -5
- package/src/js/number.ts +2 -2
- package/src/js/query.ts +6 -10
- package/src/js/queue.ts +1 -1
- package/src/js/random.ts +9 -19
- package/src/js/sized.ts +145 -145
- package/src/js/string/case.ts +1 -1
- package/src/js/string/index.ts +13 -7
- package/src/js/string/template.ts +6 -3
- package/src/js/value/clone.ts +3 -7
- package/src/js/value/compare.ts +3 -5
- package/src/js/value/diff.ts +4 -4
- package/src/js/value/equal.ts +2 -2
- package/src/js/value/get.ts +3 -3
- package/src/js/value/index.ts +2 -2
- package/src/js/value/merge.ts +3 -3
- package/src/js/value/set.ts +3 -4
- package/src/js/value/smush.ts +4 -4
- package/src/js/value/unsmush.ts +4 -4
- package/types/array/chunk.d.cts +2 -2
- package/types/array/chunk.d.ts +2 -2
- package/types/array/compact.d.cts +4 -4
- package/types/array/compact.d.ts +4 -4
- package/types/array/count.d.cts +15 -8
- package/types/array/count.d.ts +13 -7
- package/types/array/exists.d.cts +14 -5
- package/types/array/exists.d.ts +12 -4
- package/types/array/filter.d.cts +16 -7
- package/types/array/filter.d.ts +14 -6
- package/types/array/find.d.cts +16 -7
- package/types/array/find.d.ts +14 -6
- package/types/array/group-by.d.cts +51 -5
- package/types/array/group-by.d.ts +49 -5
- package/types/array/index-of.d.cts +16 -7
- package/types/array/index-of.d.ts +14 -6
- package/types/array/index.d.cts +239 -95
- package/types/array/index.d.ts +7 -6
- package/types/array/insert.d.cts +9 -4
- package/types/array/insert.d.ts +10 -5
- package/types/array/models.d.cts +14 -11
- package/types/array/models.d.ts +14 -12
- package/types/array/shuffle.d.cts +2 -2
- package/types/array/shuffle.d.ts +2 -2
- package/types/array/sort.d.cts +11 -11
- package/types/array/sort.d.ts +10 -10
- package/types/array/splice.d.cts +4 -4
- package/types/array/splice.d.ts +4 -4
- package/types/array/to-map.d.cts +44 -20
- package/types/array/to-map.d.ts +42 -20
- package/types/array/to-record.d.cts +44 -20
- package/types/array/to-record.d.ts +42 -20
- package/types/array/unique.d.cts +11 -6
- package/types/array/unique.d.ts +10 -6
- package/types/colour/base.d.cts +28 -16
- package/types/colour/base.d.ts +2 -2
- package/types/colour/functions.d.cts +28 -16
- package/types/colour/functions.d.ts +3 -3
- package/types/colour/hex.d.cts +28 -16
- package/types/colour/hex.d.ts +4 -4
- package/types/colour/hsl.d.cts +28 -16
- package/types/colour/hsl.d.ts +16 -10
- package/types/colour/index.d.cts +28 -16
- package/types/colour/index.d.ts +1 -1
- package/types/colour/is.d.cts +28 -16
- package/types/colour/is.d.ts +3 -3
- package/types/colour/rgb.d.cts +28 -16
- package/types/colour/rgb.d.ts +15 -9
- package/types/emitter.d.cts +11 -8
- package/types/emitter.d.ts +11 -8
- package/types/function.d.cts +10 -10
- package/types/function.d.ts +11 -11
- package/types/index.d.cts +1061 -669
- package/types/index.d.ts +16 -16
- package/types/internal/array/callbacks.d.cts +11 -0
- package/types/internal/array/callbacks.d.ts +2 -0
- package/types/internal/array/find.d.cts +7 -0
- package/types/internal/array/find.d.ts +3 -0
- package/types/internal/{value-handle.d.ts → value/handle.d.ts} +1 -1
- package/types/is.d.ts +1 -1
- package/types/logger.d.cts +13 -13
- package/types/logger.d.ts +13 -13
- package/types/math.d.cts +1 -1
- package/types/math.d.ts +1 -1
- package/types/models.d.cts +4 -4
- package/types/models.d.ts +1 -4
- package/types/number.d.cts +2 -2
- package/types/number.d.ts +2 -2
- package/types/query.d.cts +2 -2
- package/types/query.d.ts +3 -3
- package/types/queue.d.cts +1 -1
- package/types/queue.d.ts +1 -1
- package/types/random.d.cts +8 -12
- package/types/random.d.ts +8 -12
- package/types/sized.d.cts +6 -6
- package/types/sized.d.ts +6 -6
- package/types/string/index.d.cts +6 -3
- package/types/string/index.d.ts +3 -3
- package/types/string/template.d.cts +3 -0
- package/types/string/template.d.ts +4 -1
- package/types/value/clone.d.cts +4 -2
- package/types/value/clone.d.ts +4 -2
- package/types/value/get.d.ts +1 -1
- package/types/value/index.d.cts +8 -6
- package/types/value/index.d.ts +2 -2
- package/types/value/merge.d.cts +1 -1
- package/types/value/merge.d.ts +2 -2
- package/types/value/set.d.ts +1 -1
- package/types/value/smush.d.cts +1 -1
- package/types/value/smush.d.ts +2 -2
- package/types/value/unsmush.d.cts +1 -1
- package/types/value/unsmush.d.ts +2 -2
- package/dist/js/internal/array-callbacks.cjs +0 -18
- package/dist/js/internal/array-callbacks.js +0 -18
- package/src/js/internal/array-callbacks.ts +0 -28
- package/types/internal/array-callbacks.d.cts +0 -13
- package/types/internal/array-callbacks.d.ts +0 -2
- package/types/internal/array-find.d.cts +0 -11
- package/types/internal/array-find.d.ts +0 -4
- /package/dist/js/internal/{value-handle.cjs → value/handle.cjs} +0 -0
- /package/dist/js/internal/{value-handle.js → value/handle.js} +0 -0
- /package/types/internal/{value-handle.d.cts → value/handle.d.cts} +0 -0
package/types/array/sort.d.cts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
3
|
export type Key = number | string;
|
|
4
|
-
export type SortKey<
|
|
4
|
+
export type SortKey<Item> = {
|
|
5
5
|
direction: "asc" | "desc";
|
|
6
|
-
value: Key | SortKeyCallback<
|
|
6
|
+
value: Key | SortKeyCallback<Item>;
|
|
7
7
|
};
|
|
8
|
-
export type SortKeyCallback<
|
|
8
|
+
export type SortKeyCallback<Item> = (item: Item) => unknown;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Sort an array of items _(defaults to ascending)_
|
|
11
11
|
*/
|
|
12
|
-
export declare function sort<
|
|
12
|
+
export declare function sort<Item>(array: Item[], descending?: boolean): Item[];
|
|
13
13
|
/**
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
14
|
+
* - Sort an array of items, using a `key` to sort by a specific value
|
|
15
|
+
* - Defaults to ascending, but can be changed by setting `descending` to `true`, or using a `SortKey`
|
|
16
16
|
*/
|
|
17
|
-
export declare function sort<
|
|
17
|
+
export declare function sort<Item>(array: Item[], key: Key | SortKey<Item> | SortKeyCallback<Item>, descending?: boolean): Item[];
|
|
18
18
|
/**
|
|
19
|
-
* -
|
|
20
|
-
* -
|
|
19
|
+
* - Sort an array of items, using multiple `keys` to sort by specific values
|
|
20
|
+
* - Defaults to ascending, but can be changed by setting `descending` to `true`, or using `SortKey`
|
|
21
21
|
*/
|
|
22
|
-
export declare function sort<
|
|
22
|
+
export declare function sort<Item>(array: Item[], keys: Array<Key | SortKey<Item> | SortKeyCallback<Item>>, descending?: boolean): Item[];
|
|
23
23
|
|
|
24
24
|
export {};
|
package/types/array/sort.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { SortKey, SortKeyCallback } from '
|
|
2
|
-
import type { Key } from '
|
|
1
|
+
import type { SortKey, SortKeyCallback } from '~/array/models';
|
|
2
|
+
import type { Key } from '~/models';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Sort an array of items _(defaults to ascending)_
|
|
5
5
|
*/
|
|
6
|
-
export declare function sort<
|
|
6
|
+
export declare function sort<Item>(array: Item[], descending?: boolean): Item[];
|
|
7
7
|
/**
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
8
|
+
* - Sort an array of items, using a `key` to sort by a specific value
|
|
9
|
+
* - Defaults to ascending, but can be changed by setting `descending` to `true`, or using a `SortKey`
|
|
10
10
|
*/
|
|
11
|
-
export declare function sort<
|
|
11
|
+
export declare function sort<Item>(array: Item[], key: Key | SortKey<Item> | SortKeyCallback<Item>, descending?: boolean): Item[];
|
|
12
12
|
/**
|
|
13
|
-
* -
|
|
14
|
-
* -
|
|
13
|
+
* - Sort an array of items, using multiple `keys` to sort by specific values
|
|
14
|
+
* - Defaults to ascending, but can be changed by setting `descending` to `true`, or using `SortKey`
|
|
15
15
|
*/
|
|
16
|
-
export declare function sort<
|
|
16
|
+
export declare function sort<Item>(array: Item[], keys: Array<Key | SortKey<Item> | SortKeyCallback<Item>>, descending?: boolean): Item[];
|
package/types/array/splice.d.cts
CHANGED
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Removes and returns all items from an array starting from a specific index
|
|
5
5
|
*/
|
|
6
|
-
export declare function splice<
|
|
6
|
+
export declare function splice<Item>(array: Item[], start: number): Item[];
|
|
7
7
|
/**
|
|
8
8
|
* Removes and returns _(up to)_ a specific amount of items from an array, starting from a specific index
|
|
9
9
|
*/
|
|
10
|
-
export declare function splice<
|
|
10
|
+
export declare function splice<Item>(array: Item[], start: number, amount: number): Item[];
|
|
11
11
|
/**
|
|
12
12
|
* - Splices values into an array and returns any removed values
|
|
13
13
|
* - Uses chunking to avoid stack overflow
|
|
14
14
|
*/
|
|
15
|
-
export declare function splice<
|
|
15
|
+
export declare function splice<Item>(array: Item[], start: number, added: Item[]): Item[];
|
|
16
16
|
/**
|
|
17
17
|
* - Splices values into an array and returns any removed values
|
|
18
18
|
* - Uses chunking to avoid stack overflow
|
|
19
19
|
*/
|
|
20
|
-
export declare function splice<
|
|
20
|
+
export declare function splice<Item>(array: Item[], start: number, amount: number, added: Item[]): Item[];
|
|
21
21
|
|
|
22
22
|
export {};
|
package/types/array/splice.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Removes and returns all items from an array starting from a specific index
|
|
3
3
|
*/
|
|
4
|
-
export declare function splice<
|
|
4
|
+
export declare function splice<Item>(array: Item[], start: number): Item[];
|
|
5
5
|
/**
|
|
6
6
|
* Removes and returns _(up to)_ a specific amount of items from an array, starting from a specific index
|
|
7
7
|
*/
|
|
8
|
-
export declare function splice<
|
|
8
|
+
export declare function splice<Item>(array: Item[], start: number, amount: number): Item[];
|
|
9
9
|
/**
|
|
10
10
|
* - Splices values into an array and returns any removed values
|
|
11
11
|
* - Uses chunking to avoid stack overflow
|
|
12
12
|
*/
|
|
13
|
-
export declare function splice<
|
|
13
|
+
export declare function splice<Item>(array: Item[], start: number, added: Item[]): Item[];
|
|
14
14
|
/**
|
|
15
15
|
* - Splices values into an array and returns any removed values
|
|
16
16
|
* - Uses chunking to avoid stack overflow
|
|
17
17
|
*/
|
|
18
|
-
export declare function splice<
|
|
18
|
+
export declare function splice<Item>(array: Item[], start: number, amount: number, added: Item[]): Item[];
|
package/types/array/to-map.d.cts
CHANGED
|
@@ -1,37 +1,61 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
export type KeyedValue<Item, Key extends keyof Item> = Item[Key] extends PropertyKey ? Item[Key] : never;
|
|
3
4
|
export type Key = number | string;
|
|
4
|
-
export type ArrayCallback<
|
|
5
|
-
export type KeyCallback<
|
|
5
|
+
export type ArrayCallback<Item, Value> = (item: Item, index: number, array: Item[]) => Value;
|
|
6
|
+
export type KeyCallback<Item> = ArrayCallback<Item, Key>;
|
|
7
|
+
export type ValueCallback<Item> = ArrayCallback<Item, unknown>;
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
9
|
+
* Create a map from an array of items _(using their indices as keys)_
|
|
8
10
|
*/
|
|
9
|
-
export declare function toMap<
|
|
11
|
+
export declare function toMap<Item>(array: Item[]): Map<number, Item>;
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* Create a map from an array of items using a specific key
|
|
12
14
|
*/
|
|
13
|
-
export declare function toMap<
|
|
15
|
+
export declare function toMap<Item, Key extends keyof Item>(array: Item[], key: Key): Map<KeyedValue<Item, Key>, Item>;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
17
|
+
* Create a map from an array of items using a specific key, and grouping them into arrays
|
|
17
18
|
*/
|
|
18
|
-
export declare function toMap<
|
|
19
|
+
export declare function toMap<Item, Key extends keyof Item>(array: Item[], key: Key, arrays: true): Map<KeyedValue<Item, Key>, Item[]>;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
22
|
-
* - Groups values into arrays
|
|
21
|
+
* Create a map from an array of items using a specific key
|
|
23
22
|
*/
|
|
24
|
-
export declare function toMap<
|
|
23
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key): Map<ReturnType<Key>, Item>;
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
25
|
+
* Create a map from an array of items using a specific key, and grouping them into arrays
|
|
28
26
|
*/
|
|
29
|
-
export declare function toMap<
|
|
27
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key, arrays: true): Map<ReturnType<Key>, Item[]>;
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
32
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
33
|
-
* - Groups values into arrays
|
|
29
|
+
* Create a map from an array of items using a specific key and value
|
|
34
30
|
*/
|
|
35
|
-
export declare function toMap<Value>(array:
|
|
31
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value): Map<KeyedValue<Item, Key>, KeyedValue<Item, Value>>;
|
|
32
|
+
/**
|
|
33
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
34
|
+
*/
|
|
35
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Map<KeyedValue<Item, Key>, Array<KeyedValue<Item, Value>>>;
|
|
36
|
+
/**
|
|
37
|
+
* Create a map from an array of items using a specific key and value
|
|
38
|
+
*/
|
|
39
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Map<KeyedValue<Item, Key>, ReturnType<Value>>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
42
|
+
*/
|
|
43
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Map<KeyedValue<Item, Key>, Array<ReturnType<Value>>>;
|
|
44
|
+
/**
|
|
45
|
+
* Create a map from an array of items using a specific key and value
|
|
46
|
+
*/
|
|
47
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value): Map<ReturnType<Key>, KeyedValue<Item, Value>>;
|
|
48
|
+
/**
|
|
49
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
50
|
+
*/
|
|
51
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Map<ReturnType<Key>, Array<KeyedValue<Item, Value>>>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a map from an array of items using a specific key and value
|
|
54
|
+
*/
|
|
55
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Map<ReturnType<Key>, ReturnType<Value>>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
58
|
+
*/
|
|
59
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Map<ReturnType<Key>, Array<ReturnType<Value>>>;
|
|
36
60
|
|
|
37
61
|
export {};
|
package/types/array/to-map.d.ts
CHANGED
|
@@ -1,32 +1,54 @@
|
|
|
1
|
-
import type { KeyCallback } from '
|
|
2
|
-
import type {
|
|
1
|
+
import type { KeyCallback, ValueCallback } from '~/array/models';
|
|
2
|
+
import type { KeyedValue } from '~/models';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Create a map from an array of items _(using their indices as keys)_
|
|
5
5
|
*/
|
|
6
|
-
export declare function toMap<
|
|
6
|
+
export declare function toMap<Item>(array: Item[]): Map<number, Item>;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Create a map from an array of items using a specific key
|
|
9
9
|
*/
|
|
10
|
-
export declare function toMap<
|
|
10
|
+
export declare function toMap<Item, Key extends keyof Item>(array: Item[], key: Key): Map<KeyedValue<Item, Key>, Item>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
12
|
+
* Create a map from an array of items using a specific key, and grouping them into arrays
|
|
14
13
|
*/
|
|
15
|
-
export declare function toMap<
|
|
14
|
+
export declare function toMap<Item, Key extends keyof Item>(array: Item[], key: Key, arrays: true): Map<KeyedValue<Item, Key>, Item[]>;
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
18
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
19
|
-
* - Groups values into arrays
|
|
16
|
+
* Create a map from an array of items using a specific key
|
|
20
17
|
*/
|
|
21
|
-
export declare function toMap<
|
|
18
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key): Map<ReturnType<Key>, Item>;
|
|
22
19
|
/**
|
|
23
|
-
*
|
|
24
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
20
|
+
* Create a map from an array of items using a specific key, and grouping them into arrays
|
|
25
21
|
*/
|
|
26
|
-
export declare function toMap<
|
|
22
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key, arrays: true): Map<ReturnType<Key>, Item[]>;
|
|
27
23
|
/**
|
|
28
|
-
*
|
|
29
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
30
|
-
* - Groups values into arrays
|
|
24
|
+
* Create a map from an array of items using a specific key and value
|
|
31
25
|
*/
|
|
32
|
-
export declare function toMap<Value>(array:
|
|
26
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value): Map<KeyedValue<Item, Key>, KeyedValue<Item, Value>>;
|
|
27
|
+
/**
|
|
28
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
29
|
+
*/
|
|
30
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Map<KeyedValue<Item, Key>, Array<KeyedValue<Item, Value>>>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a map from an array of items using a specific key and value
|
|
33
|
+
*/
|
|
34
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Map<KeyedValue<Item, Key>, ReturnType<Value>>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
37
|
+
*/
|
|
38
|
+
export declare function toMap<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Map<KeyedValue<Item, Key>, Array<ReturnType<Value>>>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a map from an array of items using a specific key and value
|
|
41
|
+
*/
|
|
42
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value): Map<ReturnType<Key>, KeyedValue<Item, Value>>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
45
|
+
*/
|
|
46
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Map<ReturnType<Key>, Array<KeyedValue<Item, Value>>>;
|
|
47
|
+
/**
|
|
48
|
+
* Create a map from an array of items using a specific key and value
|
|
49
|
+
*/
|
|
50
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Map<ReturnType<Key>, ReturnType<Value>>;
|
|
51
|
+
/**
|
|
52
|
+
* Create a map from an array of items using a specific key and value, and grouping them into arrays
|
|
53
|
+
*/
|
|
54
|
+
export declare function toMap<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Map<ReturnType<Key>, Array<ReturnType<Value>>>;
|
|
@@ -1,37 +1,61 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
export type KeyedValue<Item, Key extends keyof Item> = Item[Key] extends PropertyKey ? Item[Key] : never;
|
|
3
4
|
export type Key = number | string;
|
|
4
|
-
export type ArrayCallback<
|
|
5
|
-
export type KeyCallback<
|
|
5
|
+
export type ArrayCallback<Item, Value> = (item: Item, index: number, array: Item[]) => Value;
|
|
6
|
+
export type KeyCallback<Item> = ArrayCallback<Item, Key>;
|
|
7
|
+
export type ValueCallback<Item> = ArrayCallback<Item, unknown>;
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
9
|
+
* Create a record from an array of items _(using their indices as keys)_
|
|
8
10
|
*/
|
|
9
|
-
export declare function toRecord<
|
|
11
|
+
export declare function toRecord<Item>(array: Item[]): Record<number, Item>;
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* Create a record from an array of items using a specific key
|
|
12
14
|
*/
|
|
13
|
-
export declare function toRecord<
|
|
15
|
+
export declare function toRecord<Item, Key extends keyof Item>(array: Item[], key: Key): Record<KeyedValue<Item, Key>, Item>;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
17
|
+
* Create a record from an array of items using a specific key, and grouping them into arrays
|
|
17
18
|
*/
|
|
18
|
-
export declare function toRecord<
|
|
19
|
+
export declare function toRecord<Item, Key extends keyof Item>(array: Item[], key: Key, arrays: true): Record<KeyedValue<Item, Key>, Item[]>;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
22
|
-
* - Groups values into arrays
|
|
21
|
+
* Create a record from an array of items using a specific key
|
|
23
22
|
*/
|
|
24
|
-
export declare function toRecord<
|
|
23
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key): Record<ReturnType<Key>, Item>;
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
25
|
+
* Create a record from an array of items using a specific key, and grouping them into arrays
|
|
28
26
|
*/
|
|
29
|
-
export declare function toRecord<
|
|
27
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key, arrays: true): Record<ReturnType<Key>, Item[]>;
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
32
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
33
|
-
* - Groups values into arrays
|
|
29
|
+
* Create a record from an array of items using a specific key and value
|
|
34
30
|
*/
|
|
35
|
-
export declare function toRecord<Value>(array:
|
|
31
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value): Record<KeyedValue<Item, Key>, KeyedValue<Item, Value>>;
|
|
32
|
+
/**
|
|
33
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
34
|
+
*/
|
|
35
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Record<KeyedValue<Item, Key>, Array<KeyedValue<Item, Value>>>;
|
|
36
|
+
/**
|
|
37
|
+
* Create a record from an array of items using a specific key and value
|
|
38
|
+
*/
|
|
39
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Record<KeyedValue<Item, Key>, ReturnType<Value>>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
42
|
+
*/
|
|
43
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Record<KeyedValue<Item, Key>, Array<ReturnType<Value>>>;
|
|
44
|
+
/**
|
|
45
|
+
* Create a record from an array of items using a specific key and value
|
|
46
|
+
*/
|
|
47
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value): Record<ReturnType<Key>, KeyedValue<Item, Value>>;
|
|
48
|
+
/**
|
|
49
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
50
|
+
*/
|
|
51
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Record<ReturnType<Key>, Array<KeyedValue<Item, Value>>>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a record from an array of items using a specific key and value
|
|
54
|
+
*/
|
|
55
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Record<ReturnType<Key>, ReturnType<Value>>;
|
|
56
|
+
/**
|
|
57
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
58
|
+
*/
|
|
59
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Record<ReturnType<Key>, Array<ReturnType<Value>>>;
|
|
36
60
|
|
|
37
61
|
export {};
|
|
@@ -1,32 +1,54 @@
|
|
|
1
|
-
import type { KeyCallback } from '
|
|
2
|
-
import type {
|
|
1
|
+
import type { KeyCallback, ValueCallback } from '~/array/models';
|
|
2
|
+
import type { KeyedValue } from '~/models';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Create a record from an array of items _(using their indices as keys)_
|
|
5
5
|
*/
|
|
6
|
-
export declare function toRecord<
|
|
6
|
+
export declare function toRecord<Item>(array: Item[]): Record<number, Item>;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Create a record from an array of items using a specific key
|
|
9
9
|
*/
|
|
10
|
-
export declare function toRecord<
|
|
10
|
+
export declare function toRecord<Item, Key extends keyof Item>(array: Item[], key: Key): Record<KeyedValue<Item, Key>, Item>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
12
|
+
* Create a record from an array of items using a specific key, and grouping them into arrays
|
|
14
13
|
*/
|
|
15
|
-
export declare function toRecord<
|
|
14
|
+
export declare function toRecord<Item, Key extends keyof Item>(array: Item[], key: Key, arrays: true): Record<KeyedValue<Item, Key>, Item[]>;
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
18
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
19
|
-
* - Groups values into arrays
|
|
16
|
+
* Create a record from an array of items using a specific key
|
|
20
17
|
*/
|
|
21
|
-
export declare function toRecord<
|
|
18
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key): Record<ReturnType<Key>, Item>;
|
|
22
19
|
/**
|
|
23
|
-
*
|
|
24
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
20
|
+
* Create a record from an array of items using a specific key, and grouping them into arrays
|
|
25
21
|
*/
|
|
26
|
-
export declare function toRecord<
|
|
22
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key, arrays: true): Record<ReturnType<Key>, Item[]>;
|
|
27
23
|
/**
|
|
28
|
-
*
|
|
29
|
-
* - Uses `key` to find an identifcation value to use as keys
|
|
30
|
-
* - Groups values into arrays
|
|
24
|
+
* Create a record from an array of items using a specific key and value
|
|
31
25
|
*/
|
|
32
|
-
export declare function toRecord<Value>(array:
|
|
26
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value): Record<KeyedValue<Item, Key>, KeyedValue<Item, Value>>;
|
|
27
|
+
/**
|
|
28
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
29
|
+
*/
|
|
30
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Record<KeyedValue<Item, Key>, Array<KeyedValue<Item, Value>>>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a record from an array of items using a specific key and value
|
|
33
|
+
*/
|
|
34
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Record<KeyedValue<Item, Key>, ReturnType<Value>>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
37
|
+
*/
|
|
38
|
+
export declare function toRecord<Item, Key extends keyof Item, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Record<KeyedValue<Item, Key>, Array<ReturnType<Value>>>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a record from an array of items using a specific key and value
|
|
41
|
+
*/
|
|
42
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value): Record<ReturnType<Key>, KeyedValue<Item, Value>>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
45
|
+
*/
|
|
46
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends keyof Item>(array: Item[], key: Key, value: Value, arrays: true): Record<ReturnType<Key>, Array<KeyedValue<Item, Value>>>;
|
|
47
|
+
/**
|
|
48
|
+
* Create a record from an array of items using a specific key and value
|
|
49
|
+
*/
|
|
50
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value): Record<ReturnType<Key>, ReturnType<Value>>;
|
|
51
|
+
/**
|
|
52
|
+
* Create a record from an array of items using a specific key and value, and grouping them into arrays
|
|
53
|
+
*/
|
|
54
|
+
export declare function toRecord<Item, Key extends KeyCallback<Item>, Value extends ValueCallback<Item>>(array: Item[], key: Key, value: Value, arrays: true): Record<ReturnType<Key>, Array<ReturnType<Value>>>;
|
package/types/array/unique.d.cts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
3
|
export type Key = number | string;
|
|
4
|
-
export type ArrayCallback<
|
|
5
|
-
export type KeyCallback<
|
|
4
|
+
export type ArrayCallback<Item, Value> = (item: Item, index: number, array: Item[]) => Value;
|
|
5
|
+
export type KeyCallback<Item> = ArrayCallback<Item, Key>;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Get an array of unique items
|
|
8
8
|
*/
|
|
9
|
-
export declare function unique<
|
|
9
|
+
export declare function unique<Item>(array: Item[]): Item[];
|
|
10
10
|
/**
|
|
11
|
-
* -
|
|
11
|
+
* - Get an array of unique items
|
|
12
12
|
* - Use `key` to find a comparison value to match with `value`
|
|
13
13
|
*/
|
|
14
|
-
export declare function unique<
|
|
14
|
+
export declare function unique<Item, Key extends keyof Item>(array: Item[], key: Key): Item[];
|
|
15
|
+
/**
|
|
16
|
+
* - Get an array of unique items
|
|
17
|
+
* - Use `key` to find a comparison value to match with `value`
|
|
18
|
+
*/
|
|
19
|
+
export declare function unique<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key): Item[];
|
|
15
20
|
|
|
16
21
|
export {};
|
package/types/array/unique.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import type { KeyCallback } from '
|
|
2
|
-
import type { Key } from '@/models';
|
|
1
|
+
import type { KeyCallback } from '~/array/models';
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
3
|
+
* Get an array of unique items
|
|
5
4
|
*/
|
|
6
|
-
export declare function unique<
|
|
5
|
+
export declare function unique<Item>(array: Item[]): Item[];
|
|
7
6
|
/**
|
|
8
|
-
* -
|
|
7
|
+
* - Get an array of unique items
|
|
9
8
|
* - Use `key` to find a comparison value to match with `value`
|
|
10
9
|
*/
|
|
11
|
-
export declare function unique<
|
|
10
|
+
export declare function unique<Item, Key extends keyof Item>(array: Item[], key: Key): Item[];
|
|
11
|
+
/**
|
|
12
|
+
* - Get an array of unique items
|
|
13
|
+
* - Use `key` to find a comparison value to match with `value`
|
|
14
|
+
*/
|
|
15
|
+
export declare function unique<Item, Key extends KeyCallback<Item>>(array: Item[], key: Key): Item[];
|
package/types/colour/base.d.cts
CHANGED
|
@@ -7,35 +7,41 @@ export type HSLColourValue = {
|
|
|
7
7
|
};
|
|
8
8
|
declare class HSLColour extends Colour<HSLColourValue> {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Get the current hue
|
|
11
11
|
*/
|
|
12
12
|
get hue(): number;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Set the current hue
|
|
15
15
|
*/
|
|
16
16
|
set hue(value: number);
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Get the current lightness
|
|
19
19
|
*/
|
|
20
20
|
get lightness(): number;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Set the current lightness
|
|
23
23
|
*/
|
|
24
24
|
set lightness(value: number);
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Get the current saturation
|
|
27
27
|
*/
|
|
28
28
|
get saturation(): number;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Set the current saturation
|
|
31
31
|
*/
|
|
32
32
|
set saturation(value: number);
|
|
33
33
|
constructor(value: HSLColourValue);
|
|
34
|
+
/**
|
|
35
|
+
* @inheritdoc
|
|
36
|
+
*/
|
|
34
37
|
toHex(): HexColour;
|
|
35
38
|
/**
|
|
36
|
-
*
|
|
39
|
+
* Convert the colour to an RGB-colour
|
|
37
40
|
*/
|
|
38
41
|
toRgb(): RGBColour;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritdoc
|
|
44
|
+
*/
|
|
39
45
|
toString(): string;
|
|
40
46
|
/**
|
|
41
47
|
* Convert an HSL-colour to an RGB-colour
|
|
@@ -46,11 +52,11 @@ declare class HexColour {
|
|
|
46
52
|
private readonly $colour;
|
|
47
53
|
private readonly state;
|
|
48
54
|
/**
|
|
49
|
-
*
|
|
55
|
+
* Get the value of the colour
|
|
50
56
|
*/
|
|
51
57
|
get value(): string;
|
|
52
58
|
/**
|
|
53
|
-
*
|
|
59
|
+
* Set the value of the colour
|
|
54
60
|
*/
|
|
55
61
|
set value(value: string);
|
|
56
62
|
constructor(value: string);
|
|
@@ -75,7 +81,7 @@ export declare abstract class Colour<Model> {
|
|
|
75
81
|
private readonly $colour;
|
|
76
82
|
protected readonly state: ColourState<Model>;
|
|
77
83
|
/**
|
|
78
|
-
*
|
|
84
|
+
* Get the current value of the colour
|
|
79
85
|
*/
|
|
80
86
|
get value(): Model;
|
|
81
87
|
constructor(type: string, value: Model, defaults: Model, properties: Array<keyof Model>);
|
|
@@ -98,35 +104,41 @@ export type RGBColourValue = {
|
|
|
98
104
|
};
|
|
99
105
|
declare class RGBColour extends Colour<RGBColourValue> {
|
|
100
106
|
/**
|
|
101
|
-
*
|
|
107
|
+
* Get the current blue value
|
|
102
108
|
*/
|
|
103
109
|
get blue(): number;
|
|
104
110
|
/**
|
|
105
|
-
*
|
|
111
|
+
* Set the current blue value
|
|
106
112
|
*/
|
|
107
113
|
set blue(value: number);
|
|
108
114
|
/**
|
|
109
|
-
*
|
|
115
|
+
* Get the current green value
|
|
110
116
|
*/
|
|
111
117
|
get green(): number;
|
|
112
118
|
/**
|
|
113
|
-
*
|
|
119
|
+
* Set the current green value
|
|
114
120
|
*/
|
|
115
121
|
set green(value: number);
|
|
116
122
|
/**
|
|
117
|
-
*
|
|
123
|
+
* Get the current red value
|
|
118
124
|
*/
|
|
119
125
|
get red(): number;
|
|
120
126
|
/**
|
|
121
|
-
*
|
|
127
|
+
* Set the current red value
|
|
122
128
|
*/
|
|
123
129
|
set red(value: number);
|
|
124
130
|
constructor(value: RGBColourValue);
|
|
131
|
+
/**
|
|
132
|
+
* @inheritdoc
|
|
133
|
+
*/
|
|
125
134
|
toHex(): HexColour;
|
|
126
135
|
/**
|
|
127
136
|
* Convert the colour to an HSL-colour
|
|
128
137
|
*/
|
|
129
138
|
toHsl(): HSLColour;
|
|
139
|
+
/**
|
|
140
|
+
* @inheritdoc
|
|
141
|
+
*/
|
|
130
142
|
toString(): string;
|
|
131
143
|
/**
|
|
132
144
|
* Convert an RGB-colour to a hex-colour
|
package/types/colour/base.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { HexColour } from '
|
|
1
|
+
import type { HexColour } from '~/colour/hex';
|
|
2
2
|
export declare abstract class Colour<Model> {
|
|
3
3
|
private readonly $colour;
|
|
4
4
|
protected readonly state: ColourState<Model>;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Get the current value of the colour
|
|
7
7
|
*/
|
|
8
8
|
get value(): Model;
|
|
9
9
|
constructor(type: string, value: Model, defaults: Model, properties: Array<keyof Model>);
|