iterable-linq-utility 0.0.8 → 0.0.9
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.
- package/dist/combiners/predicate.d.ts +1 -1
- package/dist/functions/filter.d.ts +1 -1
- package/dist/functions/some.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/interable-linq-utility.js +103 -102
- package/dist/interable-linq-utility.umd.cjs +1 -1
- package/dist/linqIterable.d.ts +4 -4
- package/dist/types/comparer.d.ts +1 -1
- package/dist/types/predicate.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Predicate } from "../types";
|
|
2
|
-
export declare function combinePredicates<T>(p1:
|
|
2
|
+
export declare function combinePredicates<T>(p1: Predicate<T>, p2: Predicate<T>): Predicate<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Predicate } from "@/types";
|
|
2
|
-
export declare function filter<T>(iterable: Iterable<T>, predicate:
|
|
2
|
+
export declare function filter<T>(iterable: Iterable<T>, predicate: Predicate<T>): Iterable<T>;
|
package/dist/functions/some.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Predicate } from "@/types";
|
|
2
|
-
export declare function some<T>(iterable: Iterable<T>, predicate:
|
|
2
|
+
export declare function some<T>(iterable: Iterable<T>, predicate: Predicate<T>): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type ILinqIterable } from "./linqIterable";
|
|
1
|
+
import { LinqIterableWrapper, type ILinqIterable } from "./linqIterable";
|
|
2
2
|
export declare function from<T>(iterable: Iterable<T>): ILinqIterable<T>;
|
|
3
|
-
export { ILinqIterable };
|
|
3
|
+
export { ILinqIterable, LinqIterableWrapper };
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return (r,
|
|
1
|
+
var w = Object.defineProperty;
|
|
2
|
+
var b = (e, t, r) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var n = (e, t, r) => (b(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
function y(e, t) {
|
|
5
|
+
return (r, i) => t(e(r, i), i);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return (r,
|
|
7
|
+
function p(e, t) {
|
|
8
|
+
return (r, i) => e(r, i) && t(r, i);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function z(e, t) {
|
|
11
11
|
return {
|
|
12
12
|
done: e,
|
|
13
13
|
value: t
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function S() {
|
|
17
17
|
return { done: !0, value: void 0 };
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function k(e) {
|
|
20
20
|
return typeof e == "function";
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return new
|
|
22
|
+
function M(e, t) {
|
|
23
|
+
return new f(e, t);
|
|
24
24
|
}
|
|
25
|
-
class
|
|
25
|
+
class f {
|
|
26
26
|
constructor(t, r) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
let
|
|
30
|
-
if (s instanceof
|
|
27
|
+
n(this, "predicate");
|
|
28
|
+
n(this, "source");
|
|
29
|
+
let i = r, s = t;
|
|
30
|
+
if (s instanceof f) {
|
|
31
31
|
const u = s.predicate;
|
|
32
|
-
s = s.source,
|
|
32
|
+
s = s.source, i = p(u, i);
|
|
33
33
|
}
|
|
34
|
-
this.source = s, this.predicate =
|
|
34
|
+
this.source = s, this.predicate = i;
|
|
35
35
|
}
|
|
36
36
|
[Symbol.iterator]() {
|
|
37
|
-
return new
|
|
37
|
+
return new L(this.source, this.predicate);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
class
|
|
40
|
+
class L {
|
|
41
41
|
constructor(t, r) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
n(this, "index", 0);
|
|
43
|
+
n(this, "sourceIterator");
|
|
44
|
+
n(this, "predicate");
|
|
45
45
|
this.sourceIterator = t[Symbol.iterator](), this.predicate = r;
|
|
46
46
|
}
|
|
47
47
|
next() {
|
|
@@ -52,60 +52,60 @@ class v {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return new
|
|
55
|
+
function v(e, t) {
|
|
56
|
+
return new m(e, t);
|
|
57
57
|
}
|
|
58
|
-
class
|
|
58
|
+
class m {
|
|
59
59
|
constructor(t, r) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
if (s instanceof
|
|
60
|
+
n(this, "mapper");
|
|
61
|
+
n(this, "source");
|
|
62
|
+
let i = r, s = t;
|
|
63
|
+
if (s instanceof m) {
|
|
64
64
|
const u = s.mapper;
|
|
65
|
-
s = s.source,
|
|
65
|
+
s = s.source, i = y(u, i);
|
|
66
66
|
}
|
|
67
|
-
this.source = t, this.mapper =
|
|
67
|
+
this.source = t, this.mapper = i;
|
|
68
68
|
}
|
|
69
69
|
[Symbol.iterator]() {
|
|
70
|
-
return new
|
|
70
|
+
return new N(this.source, this.mapper);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
class
|
|
73
|
+
class N {
|
|
74
74
|
constructor(t, r) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
n(this, "index", 0);
|
|
76
|
+
n(this, "sourceIterator");
|
|
77
|
+
n(this, "mapper");
|
|
78
78
|
this.sourceIterator = t[Symbol.iterator](), this.mapper = r;
|
|
79
79
|
}
|
|
80
80
|
next() {
|
|
81
81
|
const t = this.sourceIterator.next();
|
|
82
|
-
return t.done !== !0 ?
|
|
82
|
+
return t.done !== !0 ? z(!1, this.mapper(t.value, this.index++)) : S();
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
const t = e[Symbol.iterator](), r = new
|
|
87
|
-
for (let
|
|
88
|
-
r.addLast(
|
|
85
|
+
function A(e) {
|
|
86
|
+
const t = e[Symbol.iterator](), r = new h();
|
|
87
|
+
for (let i = t.next(); i.done !== !0; i = t.next())
|
|
88
|
+
r.addLast(i.value);
|
|
89
89
|
return r;
|
|
90
90
|
}
|
|
91
|
-
class
|
|
91
|
+
class F {
|
|
92
92
|
constructor(t = null) {
|
|
93
|
-
|
|
93
|
+
n(this, "current", null);
|
|
94
94
|
this.current = t;
|
|
95
95
|
}
|
|
96
96
|
next() {
|
|
97
97
|
const t = this.current;
|
|
98
|
-
return t === null ?
|
|
98
|
+
return t === null ? S() : (this.current = t.nextNode, z(!1, t.data));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
class
|
|
101
|
+
class h {
|
|
102
102
|
constructor() {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
n(this, "internalSize", 0);
|
|
104
|
+
n(this, "head", null);
|
|
105
|
+
n(this, "tail", null);
|
|
106
106
|
}
|
|
107
107
|
[Symbol.iterator]() {
|
|
108
|
-
return new
|
|
108
|
+
return new F(this.head);
|
|
109
109
|
}
|
|
110
110
|
addFirst(t) {
|
|
111
111
|
const r = {
|
|
@@ -139,54 +139,54 @@ class d {
|
|
|
139
139
|
return this.internalSize;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
return e instanceof
|
|
142
|
+
function g(e) {
|
|
143
|
+
return e instanceof I ? e : new I(e);
|
|
144
144
|
}
|
|
145
|
-
class
|
|
145
|
+
class I {
|
|
146
146
|
constructor(t) {
|
|
147
|
-
|
|
148
|
-
if (t instanceof
|
|
147
|
+
n(this, "source");
|
|
148
|
+
if (t instanceof h) {
|
|
149
149
|
this.source = t;
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
this.source =
|
|
152
|
+
this.source = A(t);
|
|
153
153
|
}
|
|
154
154
|
[Symbol.iterator]() {
|
|
155
|
-
return new
|
|
155
|
+
return new P(this.source);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
class
|
|
158
|
+
class P {
|
|
159
159
|
constructor(t) {
|
|
160
|
-
|
|
160
|
+
n(this, "sourceIterator");
|
|
161
161
|
this.sourceIterator = t[Symbol.iterator]();
|
|
162
162
|
}
|
|
163
163
|
next() {
|
|
164
164
|
return this.sourceIterator.next();
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
return e instanceof
|
|
167
|
+
function R(e) {
|
|
168
|
+
return e instanceof x ? e : new x(e);
|
|
169
169
|
}
|
|
170
|
-
class
|
|
170
|
+
class x {
|
|
171
171
|
constructor(t) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this.source = t, this.sourceIterator = t[Symbol.iterator](), t instanceof
|
|
172
|
+
n(this, "isMemoized", !1);
|
|
173
|
+
n(this, "sourceIterator");
|
|
174
|
+
n(this, "linkedList", new h());
|
|
175
|
+
n(this, "source");
|
|
176
|
+
this.source = t, this.sourceIterator = t[Symbol.iterator](), t instanceof h && (this.linkedList = t, this.isMemoized = !0);
|
|
177
177
|
}
|
|
178
178
|
[Symbol.iterator]() {
|
|
179
|
-
return this.isMemoized ? new
|
|
179
|
+
return this.isMemoized ? new T(this.linkedList) : new D(this.sourceIterator, this.linkedList, (t) => this.isMemoized = t.done === !0);
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
class
|
|
183
|
-
constructor(t, r,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
this.linkedList = r, this.linkedListIterator = r[Symbol.iterator](), this.setAsMemoized =
|
|
182
|
+
class D {
|
|
183
|
+
constructor(t, r, i) {
|
|
184
|
+
n(this, "index", 0);
|
|
185
|
+
n(this, "linkedList");
|
|
186
|
+
n(this, "linkedListIterator");
|
|
187
|
+
n(this, "setAsMemoized");
|
|
188
|
+
n(this, "sourceIterator");
|
|
189
|
+
this.linkedList = r, this.linkedListIterator = r[Symbol.iterator](), this.setAsMemoized = i, this.sourceIterator = t;
|
|
190
190
|
}
|
|
191
191
|
next() {
|
|
192
192
|
if (this.linkedList.size() > this.index++)
|
|
@@ -195,41 +195,41 @@ class T {
|
|
|
195
195
|
return this.setAsMemoized(t) || this.linkedList.addLast(t.value), t;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
class
|
|
198
|
+
class T {
|
|
199
199
|
constructor(t) {
|
|
200
|
-
|
|
200
|
+
n(this, "memoizedSourceIterator");
|
|
201
201
|
this.memoizedSourceIterator = t[Symbol.iterator]();
|
|
202
202
|
}
|
|
203
203
|
next() {
|
|
204
204
|
return this.memoizedSourceIterator.next();
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function $(e, t) {
|
|
208
208
|
const r = e[Symbol.iterator]();
|
|
209
|
-
let
|
|
210
|
-
for (t == null ?
|
|
211
|
-
let
|
|
212
|
-
for (const
|
|
213
|
-
if (
|
|
209
|
+
let i = r.next(), s = i.value, u = null;
|
|
210
|
+
for (t == null ? u = (o, a) => o < a ? -1 : o === a ? 0 : 1 : k(t) ? u = t : Array.isArray(t) ? u = (o, a) => {
|
|
211
|
+
let d = 0;
|
|
212
|
+
for (const l of t)
|
|
213
|
+
if (d = o[l] < a[l] ? -1 : o[l] === a[l] ? 0 : 1, d !== 0)
|
|
214
214
|
break;
|
|
215
|
-
return
|
|
216
|
-
} :
|
|
217
|
-
const o =
|
|
218
|
-
|
|
215
|
+
return d;
|
|
216
|
+
} : u = (o, a) => o[t] < a[t] ? -1 : o[t] === a[t] ? 0 : 1, i = r.next(); i.done !== !0; i = r.next()) {
|
|
217
|
+
const o = u(s, i.value);
|
|
218
|
+
s = o < 0 || o === 0 ? s : i.value;
|
|
219
219
|
}
|
|
220
|
-
return
|
|
220
|
+
return s == null ? null : s;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function j(e, t) {
|
|
223
223
|
const r = e[Symbol.iterator]();
|
|
224
|
-
let
|
|
224
|
+
let i = 0;
|
|
225
225
|
for (let s = r.next(); s.done !== !0; s = r.next())
|
|
226
|
-
if (t(s.value,
|
|
226
|
+
if (t(s.value, i++))
|
|
227
227
|
return !0;
|
|
228
228
|
return !1;
|
|
229
229
|
}
|
|
230
230
|
class c {
|
|
231
231
|
constructor(t) {
|
|
232
|
-
|
|
232
|
+
n(this, "iterable");
|
|
233
233
|
this.iterable = t;
|
|
234
234
|
}
|
|
235
235
|
[Symbol.iterator]() {
|
|
@@ -239,27 +239,28 @@ class c {
|
|
|
239
239
|
return [...this.iterable];
|
|
240
240
|
}
|
|
241
241
|
filter(t) {
|
|
242
|
-
return new c(
|
|
242
|
+
return new c(M(this.iterable, t));
|
|
243
243
|
}
|
|
244
244
|
map(t) {
|
|
245
|
-
return new c(
|
|
245
|
+
return new c(v(this.iterable, t));
|
|
246
246
|
}
|
|
247
247
|
materialize() {
|
|
248
|
-
return new c(
|
|
248
|
+
return new c(g(this.iterable));
|
|
249
249
|
}
|
|
250
250
|
memoize() {
|
|
251
|
-
return new c(
|
|
251
|
+
return new c(R(this.iterable));
|
|
252
252
|
}
|
|
253
253
|
min(t) {
|
|
254
|
-
return
|
|
254
|
+
return $(this.iterable, t);
|
|
255
255
|
}
|
|
256
256
|
some(t) {
|
|
257
|
-
return
|
|
257
|
+
return j(this.iterable, t);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function C(e) {
|
|
261
261
|
return new c(e);
|
|
262
262
|
}
|
|
263
263
|
export {
|
|
264
|
-
|
|
264
|
+
c as LinqIterableWrapper,
|
|
265
|
+
C as from
|
|
265
266
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u
|
|
1
|
+
(function(o,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(o=typeof globalThis<"u"?globalThis:o||self,u(o["interable-linq-utility"]={}))})(this,function(o){"use strict";var $=Object.defineProperty;var B=(o,u,d)=>u in o?$(o,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):o[u]=d;var n=(o,u,d)=>(B(o,typeof u!="symbol"?u+"":u,d),d);function u(e,t){return(r,i)=>t(e(r,i),i)}function d(e,t){return(r,i)=>e(r,i)&&t(r,i)}function S(e,t){return{done:e,value:t}}function b(){return{done:!0,value:void 0}}function C(e){return e}function w(e){return typeof e=="function"}function M(e,t){return new I(e,t)}class I{constructor(t,r){n(this,"predicate");n(this,"source");let i=r,s=t;if(s instanceof I){const l=s.predicate;s=s.source,i=d(l,i)}this.source=s,this.predicate=i}[Symbol.iterator](){return new k(this.source,this.predicate)}}class k{constructor(t,r){n(this,"index",0);n(this,"sourceIterator");n(this,"predicate");this.sourceIterator=t[Symbol.iterator](),this.predicate=r}next(){for(;;){const t=this.sourceIterator.next();if(t.done===!0||this.predicate(t.value,this.index++))return t}}}function L(e,t){return new x(e,t)}class x{constructor(t,r){n(this,"mapper");n(this,"source");let i=r,s=t;if(s instanceof x){const l=s.mapper;s=s.source,i=u(l,i)}this.source=t,this.mapper=i}[Symbol.iterator](){return new v(this.source,this.mapper)}}class v{constructor(t,r){n(this,"index",0);n(this,"sourceIterator");n(this,"mapper");this.sourceIterator=t[Symbol.iterator](),this.mapper=r}next(){const t=this.sourceIterator.next();return t.done!==!0?S(!1,this.mapper(t.value,this.index++)):b()}}function N(e){const t=e[Symbol.iterator](),r=new f;for(let i=t.next();i.done!==!0;i=t.next())r.addLast(i.value);return r}class A{constructor(t=null){n(this,"current",null);this.current=t}next(){const t=this.current;return t===null?b():(this.current=t.nextNode,S(!1,t.data))}}class f{constructor(){n(this,"internalSize",0);n(this,"head",null);n(this,"tail",null)}[Symbol.iterator](){return new A(this.head)}addFirst(t){const r={data:t,nextNode:null};switch(this.internalSize){case 0:this.head=r,this.tail=r;break;default:r.nextNode=this.head,this.head=r}return this.internalSize++,this}addLast(t){const r={data:t,nextNode:null};switch(this.internalSize){case 0:this.head=r,this.tail=r;break;default:this.tail.nextNode=r,this.tail=r}return this.internalSize++,this}size(){return this.internalSize}}function g(e){return e instanceof p?e:new p(e)}class p{constructor(t){n(this,"source");if(t instanceof f){this.source=t;return}this.source=N(t)}[Symbol.iterator](){return new F(this.source)}}class F{constructor(t){n(this,"sourceIterator");this.sourceIterator=t[Symbol.iterator]()}next(){return this.sourceIterator.next()}}function P(e){return e instanceof y?e:new y(e)}class y{constructor(t){n(this,"isMemoized",!1);n(this,"sourceIterator");n(this,"linkedList",new f);n(this,"source");this.source=t,this.sourceIterator=t[Symbol.iterator](),t instanceof f&&(this.linkedList=t,this.isMemoized=!0)}[Symbol.iterator](){return this.isMemoized?new R(this.linkedList):new T(this.sourceIterator,this.linkedList,t=>this.isMemoized=t.done===!0)}}class T{constructor(t,r,i){n(this,"index",0);n(this,"linkedList");n(this,"linkedListIterator");n(this,"setAsMemoized");n(this,"sourceIterator");this.linkedList=r,this.linkedListIterator=r[Symbol.iterator](),this.setAsMemoized=i,this.sourceIterator=t}next(){if(this.linkedList.size()>this.index++)return this.linkedListIterator.next();const t=this.sourceIterator.next();return this.setAsMemoized(t)||this.linkedList.addLast(t.value),t}}class R{constructor(t){n(this,"memoizedSourceIterator");this.memoizedSourceIterator=t[Symbol.iterator]()}next(){return this.memoizedSourceIterator.next()}}function j(e,t){const r=e[Symbol.iterator]();let i=r.next(),s=i.value,l=null;for(t==null?l=(a,c)=>a<c?-1:a===c?0:1:w(t)?l=t:Array.isArray(t)?l=(a,c)=>{let z=0;for(const m of t)if(z=a[m]<c[m]?-1:a[m]===c[m]?0:1,z!==0)break;return z}:l=(a,c)=>a[t]<c[t]?-1:a[t]===c[t]?0:1,i=r.next();i.done!==!0;i=r.next()){const a=l(s,i.value);s=a<0||a===0?s:i.value}return s==null?null:s}function D(e,t){const r=e[Symbol.iterator]();let i=0;for(let s=r.next();s.done!==!0;s=r.next())if(t(s.value,i++))return!0;return!1}class h{constructor(t){n(this,"iterable");this.iterable=t}[Symbol.iterator](){return this.iterable[Symbol.iterator]()}collectToArray(){return[...this.iterable]}filter(t){return new h(M(this.iterable,t))}map(t){return new h(L(this.iterable,t))}materialize(){return new h(g(this.iterable))}memoize(){return new h(P(this.iterable))}min(t){return j(this.iterable,t)}some(t){return D(this.iterable,t)}}function O(e){return new h(e)}o.LinqIterableWrapper=h,o.from=O,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/linqIterable.d.ts
CHANGED
|
@@ -2,22 +2,22 @@ import { Comparer, Mapper, Predicate } from '@/types';
|
|
|
2
2
|
export interface ILinqIterable<T> {
|
|
3
3
|
[Symbol.iterator](): Iterator<T, any, undefined>;
|
|
4
4
|
collectToArray(): T[];
|
|
5
|
-
filter(predicate:
|
|
5
|
+
filter(predicate: Predicate<T>): ILinqIterable<T>;
|
|
6
6
|
map<R>(mapper: Mapper<T, R>): ILinqIterable<R>;
|
|
7
7
|
materialize(): ILinqIterable<T>;
|
|
8
8
|
memoize(): ILinqIterable<T>;
|
|
9
9
|
min(comparer?: Comparer<T>): T | null | undefined;
|
|
10
|
-
some(predicate:
|
|
10
|
+
some(predicate: Predicate<T>): boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare class LinqIterableWrapper<T> implements ILinqIterable<T> {
|
|
13
13
|
constructor(iterable: Iterable<T>);
|
|
14
14
|
[Symbol.iterator](): Iterator<T, any, undefined>;
|
|
15
15
|
private iterable;
|
|
16
16
|
collectToArray(): T[];
|
|
17
|
-
filter(predicate:
|
|
17
|
+
filter(predicate: Predicate<T>): ILinqIterable<T>;
|
|
18
18
|
map<R>(mapper: Mapper<T, R>): ILinqIterable<R>;
|
|
19
19
|
materialize(): ILinqIterable<T>;
|
|
20
20
|
memoize(): ILinqIterable<T>;
|
|
21
21
|
min(comparer?: Comparer<T>): T | null | undefined;
|
|
22
|
-
some(predicate:
|
|
22
|
+
some(predicate: Predicate<T>): boolean;
|
|
23
23
|
}
|
package/dist/types/comparer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type ComparerFunction<T> = (a: T, b: T
|
|
1
|
+
declare type ComparerFunction<T> = (a: T, b: T) => number;
|
|
2
2
|
declare type ComparingProps<T> = keyof T | Array<keyof T>;
|
|
3
3
|
export declare type Comparer<T> = ComparerFunction<T> | ComparingProps<T>;
|
|
4
4
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare type Predicate<T> = (value: T, index: number) => boolean;
|
package/package.json
CHANGED