@oscarpalmer/mora 0.11.1 → 0.12.0

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/dist/computed.cjs CHANGED
@@ -37,7 +37,7 @@ class Computed extends reactive.Reactive {
37
37
  });
38
38
  }
39
39
  /**
40
- * Get the value
40
+ * @inheritdoc
41
41
  */
42
42
  get() {
43
43
  if (exports.activeComputed != null && exports.activeComputed !== this) {
package/dist/computed.js CHANGED
@@ -35,7 +35,7 @@ class Computed extends Reactive {
35
35
  });
36
36
  }
37
37
  /**
38
- * Get the value
38
+ * @inheritdoc
39
39
  */
40
40
  get() {
41
41
  if (activeComputed != null && activeComputed !== this) {
package/dist/mora.full.js CHANGED
@@ -179,7 +179,7 @@ class Computed extends Reactive {
179
179
  });
180
180
  }
181
181
  /**
182
- * Get the value
182
+ * @inheritdoc
183
183
  */
184
184
  get() {
185
185
  if (activeComputed != null && activeComputed !== this) {
@@ -206,7 +206,7 @@ class Signal extends Reactive {
206
206
  super('signal', value);
207
207
  }
208
208
  /**
209
- * Get the value
209
+ * @inheritdoc
210
210
  */
211
211
  get() {
212
212
  if (activeComputed != null) {
package/dist/signal.cjs CHANGED
@@ -9,7 +9,7 @@ class Signal extends reactive.Reactive {
9
9
  super("signal", value);
10
10
  }
11
11
  /**
12
- * Get the value
12
+ * @inheritdoc
13
13
  */
14
14
  get() {
15
15
  if (computed.activeComputed != null) {
package/dist/signal.js CHANGED
@@ -7,7 +7,7 @@ class Signal extends Reactive {
7
7
  super("signal", value);
8
8
  }
9
9
  /**
10
- * Get the value
10
+ * @inheritdoc
11
11
  */
12
12
  get() {
13
13
  if (activeComputed != null) {
package/package.json CHANGED
@@ -54,5 +54,5 @@
54
54
  },
55
55
  "type": "module",
56
56
  "types": "./types/index.d.ts",
57
- "version": "0.11.1"
57
+ "version": "0.12.0"
58
58
  }
package/src/computed.ts CHANGED
@@ -55,7 +55,7 @@ export class Computed<Value> extends Reactive<Value> {
55
55
  }
56
56
 
57
57
  /**
58
- * Get the value
58
+ * @inheritdoc
59
59
  */
60
60
  get(): Value {
61
61
  if (activeComputed != null && activeComputed !== this) {
package/src/index.ts CHANGED
@@ -2,4 +2,6 @@ export {startBatch, stopBatch} from './batch';
2
2
  export {computed, type Computed} from './computed';
3
3
  export {effect, type Effect} from './effect';
4
4
  export {isComputed, isEffect, isReactive, isSignal} from './is';
5
+ export type {Reactive} from './reactive';
5
6
  export {signal, type Signal} from './signal';
7
+
package/src/reactive.ts CHANGED
@@ -23,6 +23,11 @@ export abstract class Reactive<Value> {
23
23
  });
24
24
  }
25
25
 
26
+ /**
27
+ * Get the value
28
+ */
29
+ abstract get(): Value;
30
+
26
31
  /**
27
32
  * Get the value _(without reactivity)_
28
33
  */
package/src/signal.ts CHANGED
@@ -9,7 +9,7 @@ export class Signal<Value> extends Reactive<Value> {
9
9
  }
10
10
 
11
11
  /**
12
- * Get the value
12
+ * @inheritdoc
13
13
  */
14
14
  get(): Value {
15
15
  if (activeComputed != null) {
package/types/batch.d.cts CHANGED
@@ -10,13 +10,17 @@ declare class Computed<Value> extends Reactive<Value> {
10
10
  private readonly effect;
11
11
  constructor(callback: () => Value);
12
12
  /**
13
- * Get the value
13
+ * @inheritdoc
14
14
  */
15
15
  get(): Value;
16
16
  }
17
17
  declare abstract class Reactive<Value> {
18
18
  protected readonly state: ReactiveState<Value>;
19
19
  constructor(name: string, value: Value);
20
+ /**
21
+ * Get the value
22
+ */
23
+ abstract get(): Value;
20
24
  /**
21
25
  * Get the value _(without reactivity)_
22
26
  */
@@ -19,7 +19,7 @@ export declare class Computed<Value> extends Reactive<Value> {
19
19
  private readonly effect;
20
20
  constructor(callback: () => Value);
21
21
  /**
22
- * Get the value
22
+ * @inheritdoc
23
23
  */
24
24
  get(): Value;
25
25
  }
@@ -30,6 +30,10 @@ export declare function computed<Value>(callback: () => Value): Computed<Value>;
30
30
  declare abstract class Reactive<Value> {
31
31
  protected readonly state: ReactiveState<Value>;
32
32
  constructor(name: string, value: Value);
33
+ /**
34
+ * Get the value
35
+ */
36
+ abstract get(): Value;
33
37
  /**
34
38
  * Get the value _(without reactivity)_
35
39
  */
@@ -13,7 +13,7 @@ export declare class Computed<Value> extends Reactive<Value> {
13
13
  private readonly effect;
14
14
  constructor(callback: () => Value);
15
15
  /**
16
- * Get the value
16
+ * @inheritdoc
17
17
  */
18
18
  get(): Value;
19
19
  }
package/types/index.d.cts CHANGED
@@ -14,7 +14,7 @@ export declare class Computed<Value> extends Reactive<Value> {
14
14
  private readonly effect;
15
15
  constructor(callback: () => Value);
16
16
  /**
17
- * Get the value
17
+ * @inheritdoc
18
18
  */
19
19
  get(): Value;
20
20
  }
@@ -22,9 +22,13 @@ export declare class Computed<Value> extends Reactive<Value> {
22
22
  * Create a computed value
23
23
  */
24
24
  export declare function computed<Value>(callback: () => Value): Computed<Value>;
25
- declare abstract class Reactive<Value> {
25
+ export declare abstract class Reactive<Value> {
26
26
  protected readonly state: ReactiveState<Value>;
27
27
  constructor(name: string, value: Value);
28
+ /**
29
+ * Get the value
30
+ */
31
+ abstract get(): Value;
28
32
  /**
29
33
  * Get the value _(without reactivity)_
30
34
  */
@@ -56,7 +60,7 @@ export type Unsubscribe = () => void;
56
60
  export declare class Signal<Value> extends Reactive<Value> {
57
61
  constructor(value: Value);
58
62
  /**
59
- * Get the value
63
+ * @inheritdoc
60
64
  */
61
65
  get(): Value;
62
66
  /**
package/types/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export { startBatch, stopBatch } from './batch';
2
2
  export { computed, type Computed } from './computed';
3
3
  export { effect, type Effect } from './effect';
4
4
  export { isComputed, isEffect, isReactive, isSignal } from './is';
5
+ export type { Reactive } from './reactive';
5
6
  export { signal, type Signal } from './signal';
package/types/is.d.cts CHANGED
@@ -10,13 +10,17 @@ declare class Computed<Value> extends Reactive<Value> {
10
10
  private readonly effect;
11
11
  constructor(callback: () => Value);
12
12
  /**
13
- * Get the value
13
+ * @inheritdoc
14
14
  */
15
15
  get(): Value;
16
16
  }
17
17
  declare abstract class Reactive<Value> {
18
18
  protected readonly state: ReactiveState<Value>;
19
19
  constructor(name: string, value: Value);
20
+ /**
21
+ * Get the value
22
+ */
23
+ abstract get(): Value;
20
24
  /**
21
25
  * Get the value _(without reactivity)_
22
26
  */
@@ -48,7 +52,7 @@ export type Unsubscribe = () => void;
48
52
  declare class Signal<Value> extends Reactive<Value> {
49
53
  constructor(value: Value);
50
54
  /**
51
- * Get the value
55
+ * @inheritdoc
52
56
  */
53
57
  get(): Value;
54
58
  /**
@@ -10,13 +10,17 @@ declare class Computed<Value> extends Reactive<Value> {
10
10
  private readonly effect;
11
11
  constructor(callback: () => Value);
12
12
  /**
13
- * Get the value
13
+ * @inheritdoc
14
14
  */
15
15
  get(): Value;
16
16
  }
17
17
  export declare abstract class Reactive<Value> {
18
18
  protected readonly state: ReactiveState<Value>;
19
19
  constructor(name: string, value: Value);
20
+ /**
21
+ * Get the value
22
+ */
23
+ abstract get(): Value;
20
24
  /**
21
25
  * Get the value _(without reactivity)_
22
26
  */
@@ -4,6 +4,10 @@ import { type Subscription, type Unsubscribe } from './subscription';
4
4
  export declare abstract class Reactive<Value> {
5
5
  protected readonly state: ReactiveState<Value>;
6
6
  constructor(name: string, value: Value);
7
+ /**
8
+ * Get the value
9
+ */
10
+ abstract get(): Value;
7
11
  /**
8
12
  * Get the value _(without reactivity)_
9
13
  */
@@ -10,13 +10,17 @@ declare class Computed<Value> extends Reactive<Value> {
10
10
  private readonly effect;
11
11
  constructor(callback: () => Value);
12
12
  /**
13
- * Get the value
13
+ * @inheritdoc
14
14
  */
15
15
  get(): Value;
16
16
  }
17
17
  declare abstract class Reactive<Value> {
18
18
  protected readonly state: ReactiveState<Value>;
19
19
  constructor(name: string, value: Value);
20
+ /**
21
+ * Get the value
22
+ */
23
+ abstract get(): Value;
20
24
  /**
21
25
  * Get the value _(without reactivity)_
22
26
  */
@@ -48,7 +52,7 @@ export type Unsubscribe = () => void;
48
52
  export declare class Signal<Value> extends Reactive<Value> {
49
53
  constructor(value: Value);
50
54
  /**
51
- * Get the value
55
+ * @inheritdoc
52
56
  */
53
57
  get(): Value;
54
58
  /**
package/types/signal.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Reactive } from './reactive';
2
2
  export declare class Signal<Value> extends Reactive<Value> {
3
3
  constructor(value: Value);
4
4
  /**
5
- * Get the value
5
+ * @inheritdoc
6
6
  */
7
7
  get(): Value;
8
8
  /**
@@ -10,13 +10,17 @@ declare class Computed<Value> extends Reactive<Value> {
10
10
  private readonly effect;
11
11
  constructor(callback: () => Value);
12
12
  /**
13
- * Get the value
13
+ * @inheritdoc
14
14
  */
15
15
  get(): Value;
16
16
  }
17
17
  declare abstract class Reactive<Value> {
18
18
  protected readonly state: ReactiveState<Value>;
19
19
  constructor(name: string, value: Value);
20
+ /**
21
+ * Get the value
22
+ */
23
+ abstract get(): Value;
20
24
  /**
21
25
  * Get the value _(without reactivity)_
22
26
  */