Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weblock support in browser platform package #3226

Open
schickling opened this issue Jul 11, 2024 · 2 comments
Open

Weblock support in browser platform package #3226

schickling opened this issue Jul 11, 2024 · 2 comments
Labels
enhancement New feature or request platform

Comments

@schickling
Copy link

What is the problem this feature would solve?

Would be great if the @effect/platform-browser package would provide a module for the WebLocks browser feature.

What is the feature you are proposing to solve the problem?

See above.

What alternatives have you considered?

No response

@schickling schickling added enhancement New feature or request platform labels Jul 11, 2024
@datner
Copy link
Member

datner commented Jul 13, 2024

local-first developers and their nonsense

import { WebLock } from "@effect/platform-browser"

effect.pipe(
  Effect.flatMap(anotherOne),
  Effect.flatMap(theresMore),
  WebLock.request("my-lock")
)

or something like that? Though the api is quite involved with stealing and ifAvailable and LockManager etc etc.
Do you have a dream api in mind?

PS: I read it as "Webpack support in browser platform package" hehe

@dpnova
Copy link
Contributor

dpnova commented Jul 18, 2024

Could precedent from other similar concepts provide a guide to the interface? Not sure if it'd be compatible with weblocks though https://effect-ts.github.io/effect/effect/TReentrantLock.ts.html#treentrantlock-interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request platform
Projects
None yet
Development

No branches or pull requests

3 participants