better-lock 2.0.2-beta → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/dist/better_lock.d.ts +7 -4
- package/dist/better_lock.js +4 -1
- package/dist/better_lock.js.map +1 -1
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +92 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1414 -0
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/BetterLockError.html +5 -0
- package/docs/classes/BetterLockExecutionTimeoutError.html +5 -0
- package/docs/classes/BetterLockInternalError.html +5 -0
- package/docs/classes/BetterLockInvalidArgumentError.html +5 -0
- package/docs/classes/BetterLockJobAbortedError.html +5 -0
- package/docs/classes/BetterLockQueueOverflowError.html +5 -0
- package/docs/classes/BetterLockWaitTimeoutError.html +5 -0
- package/docs/classes/_internal_.BetterLock.html +92 -0
- package/docs/classes/_internal_.KeyQueue.html +8 -0
- package/docs/classes/_internal_.LockJob.html +28 -0
- package/docs/index.html +211 -0
- package/docs/interfaces/BetterLockJobOptions.html +9 -0
- package/docs/interfaces/BetterLockOptions.html +21 -0
- package/docs/modules/_internal_.__home_panta_dev_pantas_better_lock_src_errors_.html +1 -0
- package/docs/modules/_internal_.html +7 -0
- package/docs/modules.html +5 -0
- package/package.json +5 -2
- package/src/better_lock.ts +7 -4
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BetterLock | better-lock</title><meta name="description" content="Documentation for better-lock"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">better-lock</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">better-lock</a></li><li><a href="../modules/_internal_.html"><internal></a></li><li><a href="_internal_.BetterLock.html">BetterLock</a></li></ul><h1>Class BetterLock </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Main better lock class.</p>
|
|
3
|
+
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">BetterLock</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="_internal_.BetterLock.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_internal_.BetterLock.html#DEFAULT_OPTIONS" class="tsd-kind-icon">DEFAULT_<wbr/>OPTIONS</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.BetterLock.html#abort" class="tsd-kind-icon">abort</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.BetterLock.html#abortAll" class="tsd-kind-icon">abort<wbr/>All</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="_internal_.BetterLock.html#acquire" class="tsd-kind-icon">acquire</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.BetterLock.html#canAcquire" class="tsd-kind-icon">can<wbr/>Acquire</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Better<wbr/>Lock<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/BetterLockOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace"><internal></a><span class="tsd-signature-symbol">.</span><a href="_internal_.BetterLock.html" class="tsd-signature-type" data-tsd-kind="Class">BetterLock</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L33">better_lock.ts:33</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
4
|
+
<p>Create a better lock instance</p>
|
|
5
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/BetterLockOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/_internal_.html" class="tsd-signature-type" data-tsd-kind="Namespace"><internal></a><span class="tsd-signature-symbol">.</span><a href="_internal_.BetterLock.html" class="tsd-signature-type" data-tsd-kind="Class">BetterLock</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"><a id="DEFAULT_OPTIONS" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> DEFAULT_<wbr/>OPTIONS<a href="#DEFAULT_OPTIONS" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr/>OPTIONS<span class="tsd-signature-symbol">:</span> <a href="../interfaces/BetterLockOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockOptions</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L21">better_lock.ts:21</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
6
|
+
<p>Default options to be used when creating BetterLock instances.</p>
|
|
7
|
+
</div></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="abort" class="tsd-anchor"></a><h3 class="tsd-anchor-link">abort<a href="#abort" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">abort<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">?: </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L411">better_lock.ts:411</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
8
|
+
<p>Abort all jobs for a given key (or from the default job queue, if no key is given).
|
|
9
|
+
Job executors will not be called. Callbacks will be called with JobAbortedError.
|
|
10
|
+
Currently executing job will not be interrupted.</p>
|
|
11
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> key: <a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="abortAll" class="tsd-anchor"></a><h3 class="tsd-anchor-link">abort<wbr/>All<a href="#abortAll" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">abort<wbr/>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L426">better_lock.ts:426</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
12
|
+
<p>Abort all pending jobs from all queues.
|
|
13
|
+
Currently executing jobs will not be interrupted.</p>
|
|
14
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a id="acquire" class="tsd-anchor"></a><h3 class="tsd-anchor-link">acquire<a href="#acquire" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">acquire<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>executor<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#IPromiseExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">IPromiseExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, jobOptions<span class="tsd-signature-symbol">?: </span><a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">acquire<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>executor<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, jobOptions<span class="tsd-signature-symbol">?: </span><a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">acquire<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>executor<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, callback<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#ICallback" class="tsd-signature-type" data-tsd-kind="Type alias">ICallback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, jobOptions<span class="tsd-signature-symbol">?: </span><a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-signature tsd-kind-icon">acquire<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol"> | </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol">[]</span>, executor<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#IPromiseExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">IPromiseExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, jobOptions<span class="tsd-signature-symbol">?: </span><a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">acquire<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol"> | </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol">[]</span>, executor<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, jobOptions<span class="tsd-signature-symbol">?: </span><a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">acquire<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol"> | </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol">[]</span>, executor<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, callback<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#ICallback" class="tsd-signature-type" data-tsd-kind="Type alias">ICallback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, jobOptions<span class="tsd-signature-symbol">?: </span><a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L83">better_lock.ts:83</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
15
|
+
<p>Acquire the lock for given key or list of keys. If waiting on a list, keys will be acquired in order,
|
|
16
|
+
as they become free. Any deadlock prevention must be handled by the caller.</p>
|
|
17
|
+
</div><div><p>Once the lock is acquired, we will call the executor function, with a "done" method.
|
|
18
|
+
You must call "done" to release the lock. Alternatively, return a Promise; lock will be released
|
|
19
|
+
once promise resolves or rejects.</p>
|
|
20
|
+
<p>Return values from your executor will be passed to callback (or the resulting promise).</p>
|
|
21
|
+
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>executor: <a href="../modules/_internal_.html#IPromiseExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">IPromiseExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
22
|
+
<p>Function that will run inside the lock. Required.</p>
|
|
23
|
+
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> jobOptions: <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
24
|
+
<p>Options to be applied on this job only</p>
|
|
25
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L87">better_lock.ts:87</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
26
|
+
<p>Acquire the lock for given key or list of keys. If waiting on a list, keys will be acquired in order,
|
|
27
|
+
as they become free. Any deadlock prevention must be handled by the caller.</p>
|
|
28
|
+
</div><div><p>Once the lock is acquired, we will call the executor function, with a "done" method.
|
|
29
|
+
You must call "done" to release the lock. Alternatively, return a Promise; lock will be released
|
|
30
|
+
once promise resolves or rejects.</p>
|
|
31
|
+
<p>Return values from your executor will be passed to callback (or the resulting promise).</p>
|
|
32
|
+
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>executor: <a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
33
|
+
<p>Function that will run inside the lock. Required.</p>
|
|
34
|
+
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> jobOptions: <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
35
|
+
<p>Options to be applied on this job only</p>
|
|
36
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L91">better_lock.ts:91</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
37
|
+
<p>Acquire the lock for given key or list of keys. If waiting on a list, keys will be acquired in order,
|
|
38
|
+
as they become free. Any deadlock prevention must be handled by the caller.</p>
|
|
39
|
+
</div><div><p>Once the lock is acquired, we will call the executor function, with a "done" method.
|
|
40
|
+
You must call "done" to release the lock. Alternatively, return a Promise; lock will be released
|
|
41
|
+
once promise resolves or rejects.</p>
|
|
42
|
+
<p>Return values from your executor will be passed to callback (or the resulting promise).</p>
|
|
43
|
+
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>executor: <a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
44
|
+
<p>Function that will run inside the lock. Required.</p>
|
|
45
|
+
</div></div></li><li><h5>callback: <a href="../modules/_internal_.html#ICallback" class="tsd-signature-type" data-tsd-kind="Type alias">ICallback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
46
|
+
<p>Function to be called after the executor finishes or if we never enter the lock (timeout, queue depletion). Leave out to use promises.</p>
|
|
47
|
+
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> jobOptions: <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
48
|
+
<p>Options to be applied on this job only</p>
|
|
49
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L96">better_lock.ts:96</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
50
|
+
<p>Acquire the lock for given key or list of keys. If waiting on a list, keys will be acquired in order,
|
|
51
|
+
as they become free. Any deadlock prevention must be handled by the caller.</p>
|
|
52
|
+
</div><div><p>Once the lock is acquired, we will call the executor function, with a "done" method.
|
|
53
|
+
You must call "done" to release the lock. Alternatively, return a Promise; lock will be released
|
|
54
|
+
once promise resolves or rejects.</p>
|
|
55
|
+
<p>Return values from your executor will be passed to callback (or the resulting promise).</p>
|
|
56
|
+
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol"> | </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
57
|
+
<p>Named key or array of keys for this particular call. Calls with different keys will be run in parallel. Not required.</p>
|
|
58
|
+
</div></div></li><li><h5>executor: <a href="../modules/_internal_.html#IPromiseExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">IPromiseExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
59
|
+
<p>Function that will run inside the lock. Required.</p>
|
|
60
|
+
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> jobOptions: <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
61
|
+
<p>Options to be applied on this job only</p>
|
|
62
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L101">better_lock.ts:101</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
63
|
+
<p>Acquire the lock for given key or list of keys. If waiting on a list, keys will be acquired in order,
|
|
64
|
+
as they become free. Any deadlock prevention must be handled by the caller.</p>
|
|
65
|
+
</div><div><p>Once the lock is acquired, we will call the executor function, with a "done" method.
|
|
66
|
+
You must call "done" to release the lock. Alternatively, return a Promise; lock will be released
|
|
67
|
+
once promise resolves or rejects.</p>
|
|
68
|
+
<p>Return values from your executor will be passed to callback (or the resulting promise).</p>
|
|
69
|
+
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol"> | </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
70
|
+
<p>Named key or array of keys for this particular call. Calls with different keys will be run in parallel. Not required.</p>
|
|
71
|
+
</div></div></li><li><h5>executor: <a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
72
|
+
<p>Function that will run inside the lock. Required.</p>
|
|
73
|
+
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> jobOptions: <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
74
|
+
<p>Options to be applied on this job only</p>
|
|
75
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L106">better_lock.ts:106</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
76
|
+
<p>Acquire the lock for given key or list of keys. If waiting on a list, keys will be acquired in order,
|
|
77
|
+
as they become free. Any deadlock prevention must be handled by the caller.</p>
|
|
78
|
+
</div><div><p>Once the lock is acquired, we will call the executor function, with a "done" method.
|
|
79
|
+
You must call "done" to release the lock. Alternatively, return a Promise; lock will be released
|
|
80
|
+
once promise resolves or rejects.</p>
|
|
81
|
+
<p>Return values from your executor will be passed to callback (or the resulting promise).</p>
|
|
82
|
+
</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol"> | </span><a href="../modules.html#BetterLockKey" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockKey</a><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
83
|
+
<p>Named key or array of keys for this particular call. Calls with different keys will be run in parallel. Not required.</p>
|
|
84
|
+
</div></div></li><li><h5>executor: <a href="../modules/_internal_.html#ICallbackExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">ICallbackExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
85
|
+
<p>Function that will run inside the lock. Required.</p>
|
|
86
|
+
</div></div></li><li><h5>callback: <a href="../modules/_internal_.html#ICallback" class="tsd-signature-type" data-tsd-kind="Type alias">ICallback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
87
|
+
<p>Function to be called after the executor finishes or if we never enter the lock (timeout, queue depletion). Leave out to use promises.</p>
|
|
88
|
+
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> jobOptions: <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
89
|
+
<p>Options to be applied on this job only</p>
|
|
90
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="canAcquire" class="tsd-anchor"></a><h3 class="tsd-anchor-link">can<wbr/>Acquire<a href="#canAcquire" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">can<wbr/>Acquire<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/better_lock.ts#L56">better_lock.ts:56</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
91
|
+
<p>Returns true if the caller can <em>immediately</em> acquire the lock. There is nothing holding the key and nothing in the queue.</p>
|
|
92
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> key: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li><li class="current tsd-kind-namespace"><a href="../modules/_internal_.html"><internal></a><ul><li class=" tsd-kind-namespace tsd-parent-kind-namespace"><a href="../modules/_internal_.__home_panta_dev_pantas_better_lock_src_errors_.html">"/home/panta/dev/pantas/better-<wbr/>lock/src/errors"</a></li></ul></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-parent-kind-namespace"><a href="_internal_.BetterLock.html" class="tsd-kind-icon">Better<wbr/>Lock</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="_internal_.BetterLock.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_internal_.BetterLock.html#DEFAULT_OPTIONS" class="tsd-kind-icon">DEFAULT_<wbr/>OPTIONS</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.BetterLock.html#abort" class="tsd-kind-icon">abort</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.BetterLock.html#abortAll" class="tsd-kind-icon">abort<wbr/>All</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="_internal_.BetterLock.html#acquire" class="tsd-kind-icon">acquire</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.BetterLock.html#canAcquire" class="tsd-kind-icon">can<wbr/>Acquire</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>KeyQueue | better-lock</title><meta name="description" content="Documentation for better-lock"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">better-lock</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">better-lock</a></li><li><a href="../modules/_internal_.html"><internal></a></li><li><a href="_internal_.KeyQueue.html">KeyQueue</a></li></ul><h1>Class KeyQueue </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Class to hold pending, holding and executing jobs for one key</p>
|
|
3
|
+
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">KeyQueue</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#active" class="tsd-kind-icon">active</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#jobs" class="tsd-kind-icon">jobs</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#key" class="tsd-kind-icon">key</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_internal_.KeyQueue.html#DEFAULT_QUEUE_KEY" class="tsd-kind-icon">DEFAULT_<wbr/>QUEUE_<wbr/>KEY</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#toString" class="tsd-kind-icon">to<wbr/>String</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Key<wbr/>Queue<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.KeyQueue.html" class="tsd-signature-type" data-tsd-kind="Class">KeyQueue</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L111">internals.ts:111</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> key: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="_internal_.KeyQueue.html" class="tsd-signature-type" data-tsd-kind="Class">KeyQueue</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="active" class="tsd-anchor"></a><h3 class="tsd-anchor-link">active<a href="#active" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">active<span class="tsd-signature-symbol">:</span> <a href="_internal_.LockJob.html" class="tsd-signature-type" data-tsd-kind="Class">LockJob</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L109">internals.ts:109</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
4
|
+
<p>Active job that is holding this key. This job could be waiting on other keys or executing.</p>
|
|
5
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="jobs" class="tsd-anchor"></a><h3 class="tsd-anchor-link">jobs<a href="#jobs" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">jobs<span class="tsd-signature-symbol">:</span> <a href="_internal_.LockJob.html" class="tsd-signature-type" data-tsd-kind="Class">LockJob</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L104">internals.ts:104</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
6
|
+
<p>Queue of jobs waiting to be executed.
|
|
7
|
+
Jobs in this state are governed by the wait_timeout.</p>
|
|
8
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="key" class="tsd-anchor"></a><h3 class="tsd-anchor-link">key<a href="#key" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L98">internals.ts:98</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"><a id="DEFAULT_QUEUE_KEY" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> DEFAULT_<wbr/>QUEUE_<wbr/>KEY<a href="#DEFAULT_QUEUE_KEY" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr/>QUEUE_<wbr/>KEY<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"___DEFAULT_QUEUE_KEY___"</span><span class="tsd-signature-symbol"> = '___DEFAULT_QUEUE_KEY___'</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L96">internals.ts:96</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="toString" class="tsd-anchor"></a><h3 class="tsd-anchor-link">to<wbr/>String<a href="#toString" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">to<wbr/>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L115">internals.ts:115</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li><li class="current tsd-kind-namespace"><a href="../modules/_internal_.html"><internal></a><ul><li class=" tsd-kind-namespace tsd-parent-kind-namespace"><a href="../modules/_internal_.__home_panta_dev_pantas_better_lock_src_errors_.html">"/home/panta/dev/pantas/better-<wbr/>lock/src/errors"</a></li></ul></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-parent-kind-namespace"><a href="_internal_.KeyQueue.html" class="tsd-kind-icon">Key<wbr/>Queue</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#active" class="tsd-kind-icon">active</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#jobs" class="tsd-kind-icon">jobs</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#key" class="tsd-kind-icon">key</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_internal_.KeyQueue.html#DEFAULT_QUEUE_KEY" class="tsd-kind-icon">DEFAULT_<wbr/>QUEUE_<wbr/>KEY</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.KeyQueue.html#toString" class="tsd-kind-icon">to<wbr/>String</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LockJob | better-lock</title><meta name="description" content="Documentation for better-lock"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">better-lock</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">better-lock</a></li><li><a href="../modules/_internal_.html"><internal></a></li><li><a href="_internal_.LockJob.html">LockJob</a></li></ul><h1>Class LockJob<TResult> </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Class that represents one scheduled job and its state. This is created every time user calls "acquire"</p>
|
|
3
|
+
</div></div></section><section class="tsd-panel tsd-type-parameters"><h3>Type parameters</h3><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">LockJob</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"><a href="_internal_.LockJob.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#callback" class="tsd-kind-icon">callback</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#ended_at" class="tsd-kind-icon">ended_<wbr/>at</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#enqueued_at" class="tsd-kind-icon">enqueued_<wbr/>at</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#executed_at" class="tsd-kind-icon">executed_<wbr/>at</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#execution_timeout_id" class="tsd-kind-icon">execution_<wbr/>timeout_<wbr/>id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#executor" class="tsd-kind-icon">executor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#incoming_stack" class="tsd-kind-icon">incoming_<wbr/>stack</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#keys" class="tsd-kind-icon">keys</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#options" class="tsd-kind-icon">options</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#wait_timeout_id" class="tsd-kind-icon">wait_<wbr/>timeout_<wbr/>id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#waiting_count" class="tsd-kind-icon">waiting_<wbr/>count</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_internal_.LockJob.html#_lastId" class="tsd-kind-icon">_last<wbr/>Id</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.LockJob.html#toString" class="tsd-kind-icon">to<wbr/>String</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">new <wbr/>Lock<wbr/>Job<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>keys<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, executor<span class="tsd-signature-symbol">: </span><a href="../modules.html#BetterLockExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, callback<span class="tsd-signature-symbol">: </span><a href="../modules/_internal_.html#ICallback" class="tsd-signature-type" data-tsd-kind="Type alias">ICallback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span>, options<span class="tsd-signature-symbol">: </span><a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.LockJob.html" class="tsd-signature-type" data-tsd-kind="Class">LockJob</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L69">internals.ts:69</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>TResult</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>keys: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li><li><h5>executor: <a href="../modules.html#BetterLockExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5></li><li><h5>callback: <a href="../modules/_internal_.html#ICallback" class="tsd-signature-type" data-tsd-kind="Type alias">ICallback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h5></li><li><h5>options: <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="_internal_.LockJob.html" class="tsd-signature-type" data-tsd-kind="Class">LockJob</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="callback" class="tsd-anchor"></a><h3 class="tsd-anchor-link">callback<a href="#callback" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">callback<span class="tsd-signature-symbol">:</span> <a href="../modules/_internal_.html#ICallback" class="tsd-signature-type" data-tsd-kind="Type alias">ICallback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L32">internals.ts:32</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
4
|
+
<p>Function that will be called once job is done, whether it succeeds or times out.
|
|
5
|
+
This is supplied by user in callback API, and generated internally otherwise.</p>
|
|
6
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="ended_at" class="tsd-anchor"></a><h3 class="tsd-anchor-link">ended_<wbr/>at<a href="#ended_at" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">ended_<wbr/>at<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L47">internals.ts:47</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
7
|
+
<p>This is set when job ends, in case something holds a reference to it</p>
|
|
8
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="enqueued_at" class="tsd-anchor"></a><h3 class="tsd-anchor-link">enqueued_<wbr/>at<a href="#enqueued_at" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">enqueued_<wbr/>at<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L37">internals.ts:37</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
9
|
+
<p>Timestamp when job was created</p>
|
|
10
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="executed_at" class="tsd-anchor"></a><h3 class="tsd-anchor-link">executed_<wbr/>at<a href="#executed_at" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">executed_<wbr/>at<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L42">internals.ts:42</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
11
|
+
<p>Timestamp when job was executed</p>
|
|
12
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="execution_timeout_id" class="tsd-anchor"></a><h3 class="tsd-anchor-link">execution_<wbr/>timeout_<wbr/>id<a href="#execution_timeout_id" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">execution_<wbr/>timeout_<wbr/>id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L62">internals.ts:62</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
13
|
+
<p>Id of the execution timer</p>
|
|
14
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="executor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">executor<a href="#executor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">executor<span class="tsd-signature-symbol">:</span> <a href="../modules.html#BetterLockExecutor" class="tsd-signature-type" data-tsd-kind="Type alias">BetterLockExecutor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TResult</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L26">internals.ts:26</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
15
|
+
<p>Function that will be called inside the lock</p>
|
|
16
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="id" class="tsd-anchor"></a><h3 class="tsd-anchor-link">id<a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = undefined</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L11">internals.ts:11</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
17
|
+
<p>ID to uniquely identify this particular job</p>
|
|
18
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="incoming_stack" class="tsd-anchor"></a><h3 class="tsd-anchor-link">incoming_<wbr/>stack<a href="#incoming_stack" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">incoming_<wbr/>stack<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L67">internals.ts:67</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
19
|
+
<p>Saved incoming stack, for the purpose of extending stack traces</p>
|
|
20
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="keys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">keys<a href="#keys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L16">internals.ts:16</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
21
|
+
<p>List of keys that will be locked. Always an array</p>
|
|
22
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="options" class="tsd-anchor"></a><h3 class="tsd-anchor-link">options<a href="#options" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">options<span class="tsd-signature-symbol">:</span> <a href="../interfaces/BetterLockJobOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">BetterLockJobOptions</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L52">internals.ts:52</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
23
|
+
<p>Options that apply to this particular job</p>
|
|
24
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="wait_timeout_id" class="tsd-anchor"></a><h3 class="tsd-anchor-link">wait_<wbr/>timeout_<wbr/>id<a href="#wait_timeout_id" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">wait_<wbr/>timeout_<wbr/>id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L57">internals.ts:57</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
25
|
+
<p>Id of the wait timer</p>
|
|
26
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="waiting_count" class="tsd-anchor"></a><h3 class="tsd-anchor-link">waiting_<wbr/>count<a href="#waiting_count" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">waiting_<wbr/>count<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L21">internals.ts:21</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
27
|
+
<p>Number of keys which this job is waiting on. Once this reaches 0, job will be executed</p>
|
|
28
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static"><a id="_lastId" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> _last<wbr/>Id<a href="#_lastId" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">_last<wbr/>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L8">internals.ts:8</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="toString" class="tsd-anchor"></a><h3 class="tsd-anchor-link">to<wbr/>String<a href="#toString" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">to<wbr/>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/panta82/better-lock/blob/769de55/src/internals.ts#L84">internals.ts:84</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li><li class="current tsd-kind-namespace"><a href="../modules/_internal_.html"><internal></a><ul><li class=" tsd-kind-namespace tsd-parent-kind-namespace"><a href="../modules/_internal_.__home_panta_dev_pantas_better_lock_src_errors_.html">"/home/panta/dev/pantas/better-<wbr/>lock/src/errors"</a></li></ul></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-parent-kind-namespace tsd-has-type-parameter"><a href="_internal_.LockJob.html" class="tsd-kind-icon">Lock<wbr/>Job</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"><a href="_internal_.LockJob.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#callback" class="tsd-kind-icon">callback</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#ended_at" class="tsd-kind-icon">ended_<wbr/>at</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#enqueued_at" class="tsd-kind-icon">enqueued_<wbr/>at</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#executed_at" class="tsd-kind-icon">executed_<wbr/>at</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#execution_timeout_id" class="tsd-kind-icon">execution_<wbr/>timeout_<wbr/>id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#executor" class="tsd-kind-icon">executor</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#incoming_stack" class="tsd-kind-icon">incoming_<wbr/>stack</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#keys" class="tsd-kind-icon">keys</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#options" class="tsd-kind-icon">options</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#wait_timeout_id" class="tsd-kind-icon">wait_<wbr/>timeout_<wbr/>id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="_internal_.LockJob.html#waiting_count" class="tsd-kind-icon">waiting_<wbr/>count</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_internal_.LockJob.html#_lastId" class="tsd-kind-icon">_last<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="_internal_.LockJob.html#toString" class="tsd-kind-icon">to<wbr/>String</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|