Skip to content

Commit 04ec019

Browse files
committed
style(util): 💄 run Prettier
1 parent 69d8919 commit 04ec019

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

src/util/trees/avl/AvlMap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class AvlMap<K, V> implements Printable {
111111

112112
public readonly next = next;
113113

114-
public iterator0(): (() => undefined | AvlNode<K, V>) {
114+
public iterator0(): () => undefined | AvlNode<K, V> {
115115
let curr = this.first();
116116
return () => {
117117
if (!curr) return;

src/util/trees/avl/AvlSet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class AvlSet<V> implements Printable {
104104

105105
public readonly next = next;
106106

107-
public iterator0(): (() => undefined | AvlSetNode<V>) {
107+
public iterator0(): () => undefined | AvlSetNode<V> {
108108
let curr = this.first();
109109
return () => {
110110
if (!curr) return undefined;

src/util/trees/avl/__tests__/AvlMap.spec.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ describe('.first()/next() iteration', () => {
3131
for (let entry = tree.first(); entry; entry = tree.next(entry)) {
3232
list.push([entry.k, entry.v]);
3333
}
34-
expect(list).toEqual([['a', 1], ['b', 2], ['c', 3]]);
34+
expect(list).toEqual([
35+
['a', 1],
36+
['b', 2],
37+
['c', 3],
38+
]);
3539
});
3640
});
3741

@@ -53,7 +57,11 @@ describe('.iterator0()', () => {
5357
for (let entry = iterator(); entry; entry = iterator()) {
5458
list.push([entry.k, entry.v]);
5559
}
56-
expect(list).toEqual([['a', 1], ['b', 2], ['c', 3]]);
60+
expect(list).toEqual([
61+
['a', 1],
62+
['b', 2],
63+
['c', 3],
64+
]);
5765
});
5866
});
5967

@@ -75,7 +83,11 @@ describe('.iterator()', () => {
7583
for (let entry = iterator.next(); !entry.done; entry = iterator.next()) {
7684
list.push([entry.value!.k, entry.value!.v]);
7785
}
78-
expect(list).toEqual([['a', 1], ['b', 2], ['c', 3]]);
86+
expect(list).toEqual([
87+
['a', 1],
88+
['b', 2],
89+
['c', 3],
90+
]);
7991
});
8092
});
8193

@@ -89,6 +101,10 @@ describe('for...of iteration', () => {
89101
for (const entry of tree.entries()) {
90102
list.push([entry.k, entry.v]);
91103
}
92-
expect(list).toEqual([['a', 1], ['b', 2], ['c', 3]]);
104+
expect(list).toEqual([
105+
['a', 1],
106+
['b', 2],
107+
['c', 3],
108+
]);
93109
});
94110
});

0 commit comments

Comments
 (0)