@colyseus/schema 2.0.14 → 2.0.15

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.
@@ -695,6 +695,9 @@ class ArraySchema {
695
695
  [Symbol.iterator]() {
696
696
  return Array.from(this.$items.values())[Symbol.iterator]();
697
697
  }
698
+ static get [Symbol.species]() {
699
+ return ArraySchema;
700
+ }
698
701
  // WORKAROUND for compatibility
699
702
  // - TypeScript 4 defines @@unscopables as a function
700
703
  // - TypeScript 5 defines @@unscopables as an object
@@ -866,6 +869,9 @@ class MapSchema {
866
869
  /** Iterator */
867
870
  [Symbol.iterator]() { return this.$items[Symbol.iterator](); }
868
871
  get [Symbol.toStringTag]() { return this.$items[Symbol.toStringTag]; }
872
+ static get [Symbol.species]() {
873
+ return MapSchema;
874
+ }
869
875
  set(key, value) {
870
876
  if (value === undefined || value === null) {
871
877
  throw new Error(`MapSchema#set('${key}', ${value}): trying to set ${value} value on '${key}'.`);