Skip to content

Commit a04c7a6

Browse files
authored
Prefer Effect.gen overload to reference this inside method (#128)
1 parent c4ee174 commit a04c7a6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

extension/src/__mocks__/TestVsCode.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -939,21 +939,20 @@ export class TestVsCode extends Data.TaggedClass("TestVsCode")<{
939939
return createTestNotebookEditor(createTestNotebookDocument(uri, data));
940940
}
941941
snapshot() {
942-
const self = this;
943-
return Effect.gen(function* () {
942+
return Effect.gen(this, function* () {
944943
return {
945-
views: yield* Effect.map(Ref.get(self.views), (map) =>
944+
views: yield* Effect.map(Ref.get(this.views), (map) =>
946945
HashSet.toValues(map).toSorted(),
947946
),
948-
commands: yield* Effect.map(Ref.get(self.commands), (map) =>
947+
commands: yield* Effect.map(Ref.get(this.commands), (map) =>
949948
HashSet.toValues(map).toSorted(),
950949
),
951-
serializers: yield* Effect.map(Ref.get(self.serializers), (map) =>
950+
serializers: yield* Effect.map(Ref.get(this.serializers), (map) =>
952951
HashSet.toValues(map)
953952
.map((s) => s.notebookType)
954953
.toSorted(),
955954
),
956-
controllers: yield* Effect.map(Ref.get(self.controllers), (map) =>
955+
controllers: yield* Effect.map(Ref.get(this.controllers), (map) =>
957956
HashSet.toValues(map)
958957
.map((c) => c.id)
959958
.toSorted(),

0 commit comments

Comments
 (0)