Skip to content

Commit

Permalink
Use for...of instead of each() in disposable
Browse files Browse the repository at this point in the history
  • Loading branch information
afshin committed Aug 15, 2022
1 parent ec648c0 commit 89f9a77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion packages/disposable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"watch": "tsc --build --watch"
},
"dependencies": {
"@lumino/algorithm": "^1.9.1",
"@lumino/signaling": "^1.10.1"
},
"devDependencies": {
Expand Down
10 changes: 4 additions & 6 deletions packages/disposable/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
|
| The full license is in the file LICENSE, distributed with this software.
|----------------------------------------------------------------------------*/
import { each } from '@lumino/algorithm';

import { ISignal, Signal } from '@lumino/signaling';

/**
Expand Down Expand Up @@ -198,9 +196,9 @@ export namespace DisposableSet {
*/
export function from(items: Iterable<IDisposable>): DisposableSet {
let set = new DisposableSet();
each(items, item => {
for (const item of items) {
set.add(item);
});
}
return set;
}
}
Expand Down Expand Up @@ -250,9 +248,9 @@ export namespace ObservableDisposableSet {
*/
export function from(items: Iterable<IDisposable>): ObservableDisposableSet {
let set = new ObservableDisposableSet();
each(items, item => {
for (const item of items) {
set.add(item);
});
}
return set;
}
}

0 comments on commit 89f9a77

Please sign in to comment.