Skip to content

Commit

Permalink
update effect
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Feb 21, 2024
1 parent ef1feeb commit d028c15
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 39 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@effect/experimental": "^0.9.11",
"@effect/experimental": "^0.9.17",
"@effect/language-service": "^0.1.0",
"@types/mocha": "^10.0.6",
"@types/node": "~20.11.17",
"@types/node": "~20.11.19",
"@types/vscode": "^1.84.0",
"@types/ws": "^8.5.10",
"@vscode/test-electron": "^2.3.9",
"@vscode/vsce": "^2.23.0",
"effect": "2.3.6",
"effect": "2.4.0",
"glob": "^10.3.10",
"mocha": "^10.3.0",
"prettier": "^3.2.5",
Expand Down
60 changes: 30 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions src/VsCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,11 @@ export const listen = <A, R>(
)

export const listenStream = <A>(event: vscode.Event<A>): Stream.Stream<A> =>
Stream.asyncInterrupt<A>(emit => {
Stream.async<A>(emit => {
const d = event(data => emit.single(data))
return Either.left(
Effect.sync(() => {
d.dispose()
}),
)
return Effect.sync(() => {
d.dispose()
})
})

export const listenFork = <A, R>(
Expand Down

0 comments on commit d028c15

Please sign in to comment.