effect icon indicating copy to clipboard operation
effect copied to clipboard

Weblock support in browser platform package

Open schickling opened this issue 1 year ago • 2 comments

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 avatar Jul 11 '24 14:07 schickling

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

datner avatar Jul 13 '24 04:07 datner

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

dpnova avatar Jul 18 '24 06:07 dpnova