@wayward/types 2.15.2-beta.dev.20251031.1 → 2.15.2-beta.dev.20251102.1
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.
|
@@ -15,7 +15,7 @@ import type { RecursivePartial } from "@wayward/game/utilities/types/Recursive";
|
|
|
15
15
|
import Objects from "@wayward/utilities/object/Objects";
|
|
16
16
|
export default class DefaultMap<K, V> extends Map<K, V> implements ISerializable, Objects.ICloneable, IMergeable<Map<K, V>> {
|
|
17
17
|
readonly defaultValue: V;
|
|
18
|
-
constructor(defaultValue: V, entries?: Iterable<readonly [K, RecursivePartial<V>]
|
|
18
|
+
constructor(defaultValue: V, entries?: Iterable<readonly [K, RecursivePartial<V>]>, mergeDefaultValue?: boolean);
|
|
19
19
|
valuesAndDefault(): Generator<V>;
|
|
20
20
|
initialize(key: K): V;
|
|
21
21
|
serializeObject(serializer: ISerializer): undefined;
|
|
@@ -9,16 +9,18 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { RecursivePartial } from "@wayward/game/utilities/types/Recursive";
|
|
12
|
+
import Objects from "@wayward/utilities/object/Objects";
|
|
12
13
|
declare function Merge<T>(...objs: Array<RecursivePartial<T>>): T;
|
|
13
14
|
declare function Merge<T>(...objs: T[]): T;
|
|
14
15
|
declare function Merge<O extends any[]>(...objs: O): O[number];
|
|
15
16
|
declare namespace Merge {
|
|
16
17
|
function value<T>(value?: T | Mergeable<T>): T | undefined;
|
|
17
18
|
}
|
|
18
|
-
export declare class Mergeable<T> {
|
|
19
|
+
export declare class Mergeable<T> implements Objects.ICloneable {
|
|
19
20
|
readonly merge: (value: T | undefined) => T;
|
|
20
21
|
constructor(merge: (value: T | undefined) => T);
|
|
21
22
|
mask(): this & T;
|
|
23
|
+
[Objects.SYMBOL_CLONE](clone: typeof Objects.deepClone): this;
|
|
22
24
|
}
|
|
23
25
|
declare namespace Merge {
|
|
24
26
|
/**
|
package/package.json
CHANGED