@colyseus/schema
Advanced tools
Comparing version 1.0.34 to 1.0.35
@@ -0,29 +1,29 @@ | ||
import { SchemaDecoderCallbacks } from "../Schema"; | ||
import { ChangeTree } from "../changes/ChangeTree"; | ||
import { SchemaDecoderCallbacks } from "../Schema"; | ||
export declare function getMapProxy(value: MapSchema): MapSchema<any>; | ||
export declare class MapSchema<V = any> implements Map<string, V>, SchemaDecoderCallbacks { | ||
export declare function getMapProxy(value: MapSchema): MapSchema<any, string>; | ||
export declare class MapSchema<V = any, K extends string = string> implements Map<K, V>, SchemaDecoderCallbacks { | ||
protected $changes: ChangeTree; | ||
protected $items: Map<string, V>; | ||
protected $indexes: Map<number, string>; | ||
protected $items: Map<K, V>; | ||
protected $indexes: Map<number, K>; | ||
protected $refId: number; | ||
onAdd?: (item: V, key: string) => void; | ||
onRemove?: (item: V, key: string) => void; | ||
onChange?: (item: V, key: string) => void; | ||
onAdd?: (item: V, key: K) => void; | ||
onRemove?: (item: V, key: K) => void; | ||
onChange?: (item: V, key: K) => void; | ||
static is(type: any): boolean; | ||
constructor(initialValues?: Map<string, V> | any); | ||
constructor(initialValues?: Map<K, V> | Record<K, V>); | ||
/** Iterator */ | ||
[Symbol.iterator](): IterableIterator<[string, V]>; | ||
[Symbol.iterator](): IterableIterator<[K, V]>; | ||
get [Symbol.toStringTag](): string; | ||
set(key: string, value: V): this; | ||
get(key: string): V | undefined; | ||
delete(key: string): boolean; | ||
set(key: K, value: V): this; | ||
get(key: K): V | undefined; | ||
delete(key: K): boolean; | ||
clear(isDecoding?: boolean): void; | ||
has(key: string): boolean; | ||
forEach(callbackfn: (value: V, key: string, map: Map<string, V>) => void): void; | ||
entries(): IterableIterator<[string, V]>; | ||
keys(): IterableIterator<string>; | ||
has(key: K): boolean; | ||
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void): void; | ||
entries(): IterableIterator<[K, V]>; | ||
keys(): IterableIterator<K>; | ||
values(): IterableIterator<V>; | ||
get size(): number; | ||
protected setIndex(index: number, key: string): void; | ||
protected getIndex(index: number): string; | ||
protected setIndex(index: number, key: K): void; | ||
protected getIndex(index: number): K; | ||
protected getByIndex(index: number): V; | ||
@@ -30,0 +30,0 @@ protected deleteByIndex(index: number): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MapSchema = exports.getMapProxy = void 0; | ||
var Schema_1 = require("../Schema"); | ||
var ChangeTree_1 = require("../changes/ChangeTree"); | ||
var spec_1 = require("../spec"); | ||
var Schema_1 = require("../Schema"); | ||
function getMapProxy(value) { | ||
@@ -8,0 +8,0 @@ value['$proxy'] = true; |
{ | ||
"name": "@colyseus/schema", | ||
"version": "1.0.34", | ||
"version": "1.0.35", | ||
"description": "Binary state serializer with delta encoding for games", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -10,6 +10,2 @@ <div align="center"> | ||
</p> | ||
<a href="https://travis-ci.org/colyseus/schema"> | ||
<img src="https://img.shields.io/travis/colyseus/schema.svg?style=for-the-badge" alt="Build status" /> | ||
</a> | ||
</div> | ||
@@ -16,0 +12,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1390761
245