Interface: UseWebLockOptions
Defined in: use-web-lock.ts:6
Options for useWebLock. They map to the options of navigator.locks.request.
Extended by
Properties
ifAvailable?
optionalifAvailable?:boolean
Defined in: use-web-lock.ts:16
If the lock cannot be granted immediately, skip the work: fn is not
called and run resolves undefined. Default is false.
mode?
optionalmode?:LockMode
Defined in: use-web-lock.ts:11
"exclusive" lets one holder at a time own the lock, "shared" lets any
number of holders own it together. Default is "exclusive".
steal?
optionalsteal?:boolean
Defined in: use-web-lock.ts:22
Release any lock with the same name held in this origin and grant this
request right away. The previous holder's run rejects with an
AbortError. Needs "exclusive" mode. Default is false.