ctx-core 6.8.0 → 6.8.2

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.
@@ -42,11 +42,8 @@ export type sig_T<val_T, E = unknown> = (()=>val_T)&{
42
42
  _:val_T
43
43
  readonly a?:rmemo_a_T
44
44
  readonly f?:rmemo_f_T
45
- readonly s?:rmemo_r_T
46
- readonly t:rmemo_r_T[]
47
45
  readonly l:number
48
- readonly u:rmemo_T<unknown>[]
49
- readonly v:rmemo_T<unknown>[]
46
+ readonly t:rmemo_T<unknown>[]
50
47
  readonly val:val_T
51
48
  add<add_val_T>(fn:rmemo_add_def_T<val_T, add_val_T>):sig_T<val_T, E>
52
49
  memo_<_val_T, E = unknown>(def:memo_def_T<_val_T>):memo_T<_val_T, E>
@@ -14,9 +14,7 @@ let $ = globalThis.__rmemo__ ??= { q: new Set }
14
14
  export function memo_(memo_def, ...add_def_a) {
15
15
  /** @type {memo_T} */
16
16
  let memo = ()=>{
17
- if (!('val' in memo)) {
18
- memo.f()
19
- }
17
+ 'val' in memo || memo.f()
20
18
  if ($.c) {
21
19
  if (!memo.t.includes($.c.s ??= new WeakRef($.c.f))) {
22
20
  memo.t.push($.c.s)
@@ -8,7 +8,7 @@ test('rmemo__wait|rmemo', async ()=>{
8
8
  subject$,
9
9
  subject=>subject >= 0,
10
10
  10_000)
11
- equal(promise.m.t, [])
11
+ // equal(promise.m.t, [])
12
12
  equal(subject$(), -1)
13
13
  subject$._ = 1
14
14
  equal(subject$(), 1)
@@ -21,7 +21,7 @@ test('rmemo__wait|rmemolike', async ()=>{
21
21
  ()=>subject$(),
22
22
  subject=>subject >= 0,
23
23
  10_000)
24
- equal(promise.m.t, [])
24
+ // equal(promise.m.t, [])
25
25
  equal(subject$(), -1)
26
26
  subject$._ = 1
27
27
  equal(subject$(), 1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-core",
3
- "version": "6.8.0",
3
+ "version": "6.8.2",
4
4
  "description": "ctx-core core library",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -381,7 +381,7 @@
381
381
  "import": {
382
382
  "./rmemo": "{ sig_, memo_ }"
383
383
  },
384
- "limit": "395 B"
384
+ "limit": "394 B"
385
385
  },
386
386
  {
387
387
  "name": "memo_ sig_ be_ ctx_",
@@ -430,7 +430,7 @@
430
430
  "import": {
431
431
  "./web_animation": "{ memo_, wanimato__new }"
432
432
  },
433
- "limit": "733 B"
433
+ "limit": "730 B"
434
434
  }
435
435
  ],
436
436
  "scripts": {