@adbl/cells 0.0.15 → 0.0.16
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.
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
*/
|
|
20
20
|
export class Cell<out T extends unknown> {
|
|
21
21
|
/**
|
|
22
|
-
* @template
|
|
22
|
+
* @template U
|
|
23
23
|
* Creates a new Cell instance with the provided value.
|
|
24
|
-
* @param {
|
|
25
|
-
* @param {Partial<CellOptions<
|
|
26
|
-
* @returns {SourceCell<
|
|
24
|
+
* @param {U} value - The value to be stored in the Cell.
|
|
25
|
+
* @param {Partial<CellOptions<U>>} [options] - The options for the cell.
|
|
26
|
+
* @returns {SourceCell<U>} A new Cell instance.
|
|
27
27
|
* ```
|
|
28
28
|
* import { Cell } from '@adbl/cells';
|
|
29
29
|
*
|
|
@@ -34,12 +34,12 @@ export class Cell<out T extends unknown> {
|
|
|
34
34
|
* console.log(cell.get()) // Greetings!
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
static source: (value:
|
|
37
|
+
static source: (value: U, options?: Partial<CellOptions<U>>) => SourceCell<U>;
|
|
38
38
|
/**
|
|
39
|
-
* @template
|
|
39
|
+
* @template U
|
|
40
40
|
* Creates a new Derived instance with the provided callback function.
|
|
41
|
-
* @param {() =>
|
|
42
|
-
* @returns {DerivedCell<
|
|
41
|
+
* @param {() => U} callback - The callback function to be used by the Derived instance.
|
|
42
|
+
* @returns {DerivedCell<U>} A new Derived instance.
|
|
43
43
|
* ```
|
|
44
44
|
* import { Cell } from '@adbl/cells';
|
|
45
45
|
*
|
|
@@ -52,7 +52,7 @@ export class Cell<out T extends unknown> {
|
|
|
52
52
|
* console.log(derived.get()); // 6
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
static derived: (callback: () =>
|
|
55
|
+
static derived: (callback: () => U) => DerivedCell<U>;
|
|
56
56
|
/**
|
|
57
57
|
* @template X
|
|
58
58
|
* Batches all the effects created to run only once.
|
package/dist/library/classes.js
CHANGED
|
@@ -442,11 +442,11 @@ export class Cell {
|
|
|
442
442
|
return this.wvalue;
|
|
443
443
|
}
|
|
444
444
|
/**
|
|
445
|
-
* @template
|
|
445
|
+
* @template U
|
|
446
446
|
* Creates a new Cell instance with the provided value.
|
|
447
|
-
* @param {
|
|
448
|
-
* @param {Partial<CellOptions<
|
|
449
|
-
* @returns {SourceCell<
|
|
447
|
+
* @param {U} value - The value to be stored in the Cell.
|
|
448
|
+
* @param {Partial<CellOptions<U>>} [options] - The options for the cell.
|
|
449
|
+
* @returns {SourceCell<U>} A new Cell instance.
|
|
450
450
|
* ```
|
|
451
451
|
* import { Cell } from '@adbl/cells';
|
|
452
452
|
*
|
|
@@ -459,10 +459,10 @@ export class Cell {
|
|
|
459
459
|
*/
|
|
460
460
|
static source = (value, options) => new SourceCell(value, options);
|
|
461
461
|
/**
|
|
462
|
-
* @template
|
|
462
|
+
* @template U
|
|
463
463
|
* Creates a new Derived instance with the provided callback function.
|
|
464
|
-
* @param {() =>
|
|
465
|
-
* @returns {DerivedCell<
|
|
464
|
+
* @param {() => U} callback - The callback function to be used by the Derived instance.
|
|
465
|
+
* @returns {DerivedCell<U>} A new Derived instance.
|
|
466
466
|
* ```
|
|
467
467
|
* import { Cell } from '@adbl/cells';
|
|
468
468
|
*
|