@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
67 lines • 1.3 kB
TypeScript
/**
* Decorator that wraps another map and lets you observe mutations
* @template K,V
*/
export class ObservedMap<K, V> {
/**
* @template K,V
* @constructor
*/
constructor(source?: Map<any, any>);
/**
* @readonly
*/
readonly on: {
/**
* @type {Signal}
*/
set: Signal;
/**
* @type {Signal}
*/
deleted: Signal;
};
/**
*
* @type {Map<K, V>}
*/
data: Map<K_1, V_1>;
/**
*
* @param {K} key
* @return {boolean}
*/
has(key: K): boolean;
/**
*
* @param {K} key
* @returns {V|undefined}
*/
get(key: K): V | undefined;
/**
*
* @param {K} key
* @param {V} value
* @returns {ObservedMap}
*/
set(key: K, value: V): ObservedMap<any, any>;
/**
*
* @param {K} key
* @returns {boolean}
*/
delete(key: K): boolean;
/**
* Implements {@link Map#forEach} interface
* @param {function} callback
* @param {*} [thisArg]
*/
forEach(callback: Function, thisArg?: any): void;
/**
*
* @return {number}
*/
get size(): number;
}
import Signal from "../../events/signal/Signal.js";
//# sourceMappingURL=ObservedMap.d.ts.map