| 12345678910111213141516 |
- import { Data } from "./Data";
- /**
- * 带类型定义的Map类型数据
- * @author 袁浩
- */
- export class MapData<K extends PropertyKey, V> extends Data {
- public set(key: K, value: V) {
- super.set(key, value);
- }
- public get(key: K): V {
- return super.get(key);
- }
- public has(key: K): boolean {
- return this.get(key) !== undefined;
- }
- }
|