@esportsplus/reactivity 0.1.30 → 0.1.31

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.
@@ -31,7 +31,7 @@ declare class ReactiveArray<T> extends Array<T> {
31
31
  dispatch<E extends keyof Events<T>>(event: E, data?: Events<T>[E]): void;
32
32
  dispose(): void;
33
33
  fill(value: T, start?: number, end?: number): this;
34
- map<U>(fn: (this: ReactiveArray<T>, value: T, i: number, values: this) => U): U[];
34
+ map<U>(fn: (this: ReactiveArray<T>, value: T, i: number) => U): U[];
35
35
  on<E extends keyof Events<T>>(event: E, listener: Listener<Events<T>[E]>): void;
36
36
  once<E extends keyof Events<T>>(event: E, listener: Listener<Events<T>[E]>): void;
37
37
  pop(): T | undefined;
@@ -37,7 +37,7 @@ class ReactiveArray extends Array {
37
37
  map(fn) {
38
38
  let values = [];
39
39
  for (let i = 0, n = this.length; i < n; i++) {
40
- values.push(fn.call(this, this[i], i, this));
40
+ values.push(fn.call(this, this[i], i));
41
41
  }
42
42
  return values;
43
43
  }
package/package.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "prepublishOnly": "npm run build"
17
17
  },
18
18
  "types": "build/index.d.ts",
19
- "version": "0.1.30"
19
+ "version": "0.1.31"
20
20
  }
@@ -66,11 +66,12 @@ class ReactiveArray<T> extends Array<T> {
66
66
  return this;
67
67
  }
68
68
 
69
- map<U>(fn: (this: ReactiveArray<T>, value: T, i: number, values: this) => U) {
69
+ // @ts-ignore
70
+ map<U>(fn: (this: ReactiveArray<T>, value: T, i: number) => U) {
70
71
  let values: U[] = [];
71
72
 
72
73
  for (let i = 0, n = this.length; i < n; i++) {
73
- values.push( fn.call(this, this[i], i, this) );
74
+ values.push( fn.call(this, this[i], i) );
74
75
  }
75
76
 
76
77
  return values;
@@ -104,6 +105,7 @@ class ReactiveArray<T> extends Array<T> {
104
105
  return n;
105
106
  }
106
107
 
108
+ // @ts-ignore
107
109
  reverse() {
108
110
  super.reverse();
109
111
 
@@ -124,6 +126,7 @@ class ReactiveArray<T> extends Array<T> {
124
126
  return item;
125
127
  }
126
128
 
129
+ // @ts-ignore
127
130
  sort() {
128
131
  super.sort();
129
132