ctx-core 5.38.2 → 6.0.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/all/be/index.d.ts +2 -2
- package/all/be/index.js +1 -1
- package/all/be_/index.d.ts +31 -31
- package/all/be_/index.js +11 -11
- package/all/be_/index.test.ts +30 -30
- package/all/be_lock_memosig_triple/index.d.ts +7 -7
- package/all/be_lock_memosig_triple/index.test.ts +6 -6
- package/all/be_memo_pair/index.d.ts +7 -7
- package/all/be_memo_pair/index.test.ts +8 -8
- package/all/be_memosig_triple/index.d.ts +7 -7
- package/all/be_memosig_triple/index.test.ts +11 -11
- package/all/be_sig_triple/index.d.ts +7 -7
- package/all/be_sig_triple/index.test.ts +7 -7
- package/all/ctx/index.d.ts +8 -8
- package/all/ctx/index.js +3 -3
- package/all/ctx/index.test.ts +7 -7
- package/all/event_log/index.d.ts +3 -3
- package/all/window__ctx__set/index.browser.js +1 -1
- package/all/window__ctx__set/index.d.ts +2 -2
- package/all/window__ctx__set/index.js +1 -1
- package/package.json +1 -1
package/all/be/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { be__val__new_T, be_config_T,
|
|
1
|
+
import type { be__val__new_T, be_config_T, wide_ctx_T } from '../be_/index.js'
|
|
2
2
|
export declare function be<
|
|
3
3
|
val_T extends NonNullable<unknown>,
|
|
4
4
|
ns_T extends string = '',
|
|
5
|
-
ctx_T extends
|
|
5
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
6
6
|
>(
|
|
7
7
|
ctx:ctx_T,
|
|
8
8
|
val_:be__val__new_T<val_T, ns_T, ctx_T>,
|
package/all/be/index.js
CHANGED
package/all/be_/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export declare function globalThis__be_<
|
|
2
2
|
val_T,
|
|
3
3
|
ns_T extends string = '',
|
|
4
|
-
ctx_T extends
|
|
4
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
5
5
|
>(val__new:be__val__new_T<val_T, ns_T, ctx_T>, config:be_config_T<ns_T>&{
|
|
6
6
|
id:string
|
|
7
7
|
}):Be<val_T, ns_T, ctx_T>
|
|
8
8
|
/**
|
|
9
|
-
* Auto-memoization function for the
|
|
9
|
+
* Auto-memoization function for the ctx_T.
|
|
10
10
|
*
|
|
11
|
-
* Returns a function to ensure that a member id is defined on a
|
|
11
|
+
* Returns a function to ensure that a member id is defined on a ctx_T,
|
|
12
12
|
* otherwise it caches & uses the return value of val__new.
|
|
13
13
|
*/
|
|
14
14
|
export declare function be_<
|
|
15
15
|
val_T,
|
|
16
16
|
ns_T extends string = '',
|
|
17
|
-
ctx_T extends
|
|
17
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
18
18
|
>(
|
|
19
19
|
val__new:be__val__new_T<val_T, ns_T, ctx_T>,
|
|
20
20
|
...config_arg_a:be_config_arg_a_T<ns_T>
|
|
@@ -26,14 +26,14 @@ export type be_config_arg_a_T<ns_T extends string = ''> =
|
|
|
26
26
|
export declare function ns_be_<
|
|
27
27
|
val_T,
|
|
28
28
|
ns_T extends string,
|
|
29
|
-
ctx_T extends
|
|
29
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
30
30
|
>(
|
|
31
31
|
ns:ns_T,
|
|
32
32
|
val__new:be__val__new_T<val_T, ns_T, ctx_T>
|
|
33
33
|
):Be<val_T, ns_T, ctx_T>
|
|
34
34
|
export declare function id_be_<
|
|
35
35
|
val_T,
|
|
36
|
-
ctx_T extends
|
|
36
|
+
ctx_T extends wide_ctx_T<''> = wide_ctx_T<''>,
|
|
37
37
|
>(
|
|
38
38
|
id:string,
|
|
39
39
|
val__new:be__val__new_T<val_T, '', ctx_T>
|
|
@@ -41,7 +41,7 @@ export declare function id_be_<
|
|
|
41
41
|
export declare function ns_id_be_<
|
|
42
42
|
val_T,
|
|
43
43
|
ns_T extends string,
|
|
44
|
-
ctx_T extends
|
|
44
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
45
45
|
>(
|
|
46
46
|
ns:ns_T,
|
|
47
47
|
id:string,
|
|
@@ -50,7 +50,7 @@ export declare function ns_id_be_<
|
|
|
50
50
|
export declare function ctx__get<
|
|
51
51
|
val_T,
|
|
52
52
|
ns_T extends string = '',
|
|
53
|
-
ctx_T extends
|
|
53
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
54
54
|
>(
|
|
55
55
|
ctx:ctx_T,
|
|
56
56
|
be_OR_id:Be<val_T>|string|symbol,
|
|
@@ -59,7 +59,7 @@ export declare function ctx__get<
|
|
|
59
59
|
export declare function ctx__set<
|
|
60
60
|
val_T,
|
|
61
61
|
ns_T extends string = '',
|
|
62
|
-
ctx_T extends
|
|
62
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
63
63
|
>(
|
|
64
64
|
ctx:ctx_T,
|
|
65
65
|
be_OR_id:Be<val_T>|string|symbol,
|
|
@@ -68,7 +68,7 @@ export declare function ctx__set<
|
|
|
68
68
|
):void
|
|
69
69
|
export declare function ctx__delete<
|
|
70
70
|
ns_T extends string = '',
|
|
71
|
-
ctx_T extends
|
|
71
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
72
72
|
>(
|
|
73
73
|
ctx:ctx_T,
|
|
74
74
|
be_OR_id:Be<unknown, ns_T, ctx_T>|string|symbol,
|
|
@@ -79,24 +79,24 @@ export declare function ctx__delete<
|
|
|
79
79
|
* This behavior can be used in conjunction with ondelete_be_ to run the ondelete callbacks
|
|
80
80
|
* on all of the ondelete_be functions.
|
|
81
81
|
*/
|
|
82
|
-
export declare function ctx__clear(ctx:
|
|
82
|
+
export declare function ctx__clear(ctx:ctx_T):void
|
|
83
83
|
export declare function be__has_<
|
|
84
84
|
ns_T extends string = '',
|
|
85
|
-
ctx_T extends
|
|
85
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
86
86
|
>(be_OR_id:Be<unknown, ns_T, ctx_T>|string, ctx:ctx_T, ns?:ns_T):boolean
|
|
87
87
|
export declare function be_map__find<
|
|
88
88
|
ns_T extends string = '',
|
|
89
|
-
ctx_T extends
|
|
89
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
90
90
|
>(be_OR_id:Be<unknown, ns_T, ctx_T>|string, ctx:ctx_T, ns?:ns_T):BeMap<ns_T>
|
|
91
91
|
export declare function be__val_<
|
|
92
92
|
val_T,
|
|
93
93
|
ns_T extends string = '',
|
|
94
|
-
ctx_T extends
|
|
94
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
95
95
|
>(be_OR_id:Be<val_T, ns_T, ctx_T>|string, ctx:ctx_T, ns?:ns_T):val_T|unknown|null
|
|
96
96
|
export declare function ondelete_be_<
|
|
97
97
|
val_T,
|
|
98
98
|
ns_T extends string = '',
|
|
99
|
-
ctx_T extends
|
|
99
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
100
100
|
>(
|
|
101
101
|
val__new:ondelete_be__val__new_T<val_T, ns_T, ctx_T>,
|
|
102
102
|
config?:be_config_T<ns_T>
|
|
@@ -104,12 +104,12 @@ export declare function ondelete_be_<
|
|
|
104
104
|
export type Be<
|
|
105
105
|
val_T,
|
|
106
106
|
ns_T extends string = '',
|
|
107
|
-
ctx_T extends
|
|
107
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
108
108
|
> = ((ctx:ctx_T)=>val_T)&be_o_T<val_T, ns_T, ctx_T>
|
|
109
109
|
export type ondelete_Be<
|
|
110
110
|
val_T,
|
|
111
111
|
ns_T extends string = '',
|
|
112
|
-
ctx_T extends
|
|
112
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
113
113
|
> = ((ctx:ctx_T)=>val_T)&be_o_T<val_T, ns_T, ctx_T>&{
|
|
114
114
|
ondelete(
|
|
115
115
|
cb:(val:val_T, ctx:ctx_T, be:Be<val_T, ns_T, ctx_T>)=>void
|
|
@@ -119,7 +119,7 @@ export type ondelete_Be<
|
|
|
119
119
|
export type be_o_T<
|
|
120
120
|
val_T,
|
|
121
121
|
ns_T extends string = '',
|
|
122
|
-
ctx_T extends
|
|
122
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
123
123
|
> = {
|
|
124
124
|
id:string|Be<val_T, ns_T, ctx_T>
|
|
125
125
|
ns:ns_T
|
|
@@ -133,53 +133,53 @@ export type BeMap<
|
|
|
133
133
|
ns_T extends string = ''
|
|
134
134
|
> =
|
|
135
135
|
Map<
|
|
136
|
-
Be<unknown, ns_T,
|
|
137
|
-
[unknown, Be<unknown, ns_T,
|
|
136
|
+
Be<unknown, ns_T, wide_ctx_T<ns_T>>|string|symbol,
|
|
137
|
+
[unknown, Be<unknown, ns_T, wide_ctx_T<ns_T>>, wide_ctx_T<ns_T>]
|
|
138
138
|
>
|
|
139
139
|
export type BeMapO<ns_union_T extends string> =
|
|
140
140
|
{ [K in ns_union_T]:BeMap<K> }
|
|
141
141
|
export type be__val__new_T<
|
|
142
142
|
val_T,
|
|
143
143
|
ns_T extends string = '',
|
|
144
|
-
ctx_T extends
|
|
144
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
145
145
|
> = (ctx:ctx_T, be:Be<val_T, ns_T, ctx_T>)=>val_T
|
|
146
146
|
export type ondelete_be__val__new_T<
|
|
147
147
|
val_T,
|
|
148
148
|
ns_T extends string = '',
|
|
149
|
-
ctx_T extends
|
|
149
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
150
150
|
> =
|
|
151
151
|
(
|
|
152
152
|
ctx:ctx_T,
|
|
153
153
|
be:ondelete_Be<val_T, ns_T, ctx_T>
|
|
154
154
|
)=>val_T
|
|
155
|
-
export type
|
|
156
|
-
s:
|
|
155
|
+
export type ctx_T<ns_T extends string = string> = Readonly<{
|
|
156
|
+
s:ctx_s_T<ns_T>
|
|
157
157
|
is_ctx:true
|
|
158
158
|
/**
|
|
159
159
|
* Used for type inference narrowing. There is no js implementation.
|
|
160
160
|
*/
|
|
161
161
|
ns_T?:ns_T
|
|
162
162
|
}>
|
|
163
|
-
export type
|
|
164
|
-
|
|
165
|
-
export type
|
|
163
|
+
export type wide_ctx_T<ns_union_T extends string> =
|
|
164
|
+
ctx_T&wide_ctx_s_T<ns_union_T>
|
|
165
|
+
export type ctx_s_T<ns_union_T extends string = string> = {
|
|
166
166
|
[K in ns_union_T]:BeMap<K>
|
|
167
167
|
}
|
|
168
|
-
export type
|
|
168
|
+
export type wide_ctx_s_T<ns_union_T extends string> = {
|
|
169
169
|
s:BeMapO<ns_union_T>
|
|
170
170
|
}
|
|
171
171
|
export type ctx__be_T<
|
|
172
172
|
be_val_T,
|
|
173
173
|
ns_T extends string = '',
|
|
174
|
-
ctx_T extends
|
|
174
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
175
175
|
> = Be<be_val_T, ns_T, ctx_T>
|
|
176
176
|
export type ctx__get_T<
|
|
177
177
|
val_T,
|
|
178
178
|
ns_T extends string = '',
|
|
179
|
-
ctx_T extends
|
|
179
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
180
180
|
> = (ctx:ctx_T)=>val_T
|
|
181
181
|
export type ctx__set_T<
|
|
182
182
|
val_T,
|
|
183
183
|
ns_T extends string = '',
|
|
184
|
-
ctx_T extends
|
|
184
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
185
185
|
> = (ctx:ctx_T, val:val_T)=>void
|
package/all/be_/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="./index.d.ts" />
|
|
2
2
|
let _undefined
|
|
3
3
|
/**
|
|
4
|
-
* Auto-memoization function for the
|
|
4
|
+
* Auto-memoization function for the ctx_T.
|
|
5
5
|
*
|
|
6
|
-
* Returns a function to ensure that a member id is defined on a
|
|
6
|
+
* Returns a function to ensure that a member id is defined on a ctx_T,
|
|
7
7
|
* otherwise it caches & uses the return value of val__new.
|
|
8
8
|
* @param {be__val__new_T}val__new
|
|
9
9
|
* @param {be_config_T}[config]
|
|
@@ -69,7 +69,7 @@ export function ns_id_be_(ns, id, val__new) {
|
|
|
69
69
|
return be_(val__new, { ns, id })
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* Auto-memoization function for the
|
|
72
|
+
* Auto-memoization function for the ctx_T.
|
|
73
73
|
* Memoized on globalThis to allow packages being loaded multiple times, which can happen during bundling.
|
|
74
74
|
*
|
|
75
75
|
* Returns a function to ensure that a member id_OR_val_ is defined on a ctx object,
|
|
@@ -82,7 +82,7 @@ export function ns_id_be_(ns, id, val__new) {
|
|
|
82
82
|
*/
|
|
83
83
|
export { be_ as globalThis__be_ }
|
|
84
84
|
/**
|
|
85
|
-
* @param {
|
|
85
|
+
* @param {ctx_T}ctx
|
|
86
86
|
* @param {Be|string|symbol}be_OR_id
|
|
87
87
|
* @param {string}[ns]
|
|
88
88
|
* @returns {unknown}
|
|
@@ -96,7 +96,7 @@ export function ctx__get(
|
|
|
96
96
|
return ctx.s[ns].get(be_OR_id.id ?? be_OR_id)?.[0]
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
|
-
* @param {
|
|
99
|
+
* @param {ctx_T}ctx
|
|
100
100
|
* @param {Be|string|symbol}be_OR_id
|
|
101
101
|
* @param {unknown}val
|
|
102
102
|
* @param {string}[ns]
|
|
@@ -118,7 +118,7 @@ export function ctx__set(
|
|
|
118
118
|
ctx.s[ns].set(state[1], state)
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* @param {
|
|
121
|
+
* @param {ctx_T}ctx
|
|
122
122
|
* @param {Be|string|symbol}be_OR_id
|
|
123
123
|
* @param {string}[ns]
|
|
124
124
|
*/
|
|
@@ -137,7 +137,7 @@ export function ctx__delete(
|
|
|
137
137
|
* Clear all BeMap values by running ctx__delete on all stored Be functions.
|
|
138
138
|
* This behavior can be used in conjunction with ondelete_be_ to run the ondelete callbacks
|
|
139
139
|
* on all of the ondelete_be functions.
|
|
140
|
-
* @param {
|
|
140
|
+
* @param {ctx_T}ctx
|
|
141
141
|
*/
|
|
142
142
|
export function ctx__clear(ctx) {
|
|
143
143
|
for (let ns in ctx.s) {
|
|
@@ -147,7 +147,7 @@ export function ctx__clear(ctx) {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
|
-
* @param {[Be|string,
|
|
150
|
+
* @param {[Be|string, ctx_T]|[Be|string, ctx_T, string]}arg_a
|
|
151
151
|
* @returns {boolean}
|
|
152
152
|
* @private
|
|
153
153
|
*/
|
|
@@ -156,9 +156,9 @@ export function be__has_(...arg_a) {
|
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* @param {Be}be_OR_id
|
|
159
|
-
* @param {
|
|
159
|
+
* @param {ctx_T}ctx
|
|
160
160
|
* @param {string}[ns]
|
|
161
|
-
* @returns {
|
|
161
|
+
* @returns {ctx_T}
|
|
162
162
|
* @private
|
|
163
163
|
*/
|
|
164
164
|
export function be_map__find(be_OR_id, ctx, ns = be_OR_id.ns ?? '') {
|
|
@@ -166,7 +166,7 @@ export function be_map__find(be_OR_id, ctx, ns = be_OR_id.ns ?? '') {
|
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* @param {Be|string}be_OR_id
|
|
169
|
-
* @param {
|
|
169
|
+
* @param {ctx_T}ctx
|
|
170
170
|
* @param {string}[ns]
|
|
171
171
|
* @returns {unknown}
|
|
172
172
|
* @private
|
package/all/be_/index.test.ts
CHANGED
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
be__val_,
|
|
13
13
|
be_map__find,
|
|
14
14
|
type BeMapO,
|
|
15
|
-
type
|
|
15
|
+
type ctx_T,
|
|
16
16
|
ctx__clear,
|
|
17
17
|
ctx__delete,
|
|
18
18
|
ctx__set,
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
type
|
|
19
|
+
type ctx_s_T,
|
|
20
|
+
type wide_ctx_s_T,
|
|
21
|
+
type wide_ctx_T,
|
|
22
22
|
globalThis__be_, id_be_, ns_be_, ns_id_be_,
|
|
23
23
|
ondelete_be_
|
|
24
24
|
} from '../be_/index.js'
|
|
@@ -102,7 +102,7 @@ test('be_|ns', ()=>{
|
|
|
102
102
|
const ctx0 = ctx__new()
|
|
103
103
|
const ctx1 = ns_ctx__new('ctx1')
|
|
104
104
|
const ctx = ns_ctx__new(ctx0, ctx1)
|
|
105
|
-
const be__ctx_a:
|
|
105
|
+
const be__ctx_a:wide_ctx_T<'ctx1'>[] = []
|
|
106
106
|
const root_ = be_<number, 'ctx1'>(
|
|
107
107
|
ctx=>{
|
|
108
108
|
be__ctx_a.push(ctx)
|
|
@@ -122,38 +122,38 @@ test('be_|ns', ()=>{
|
|
|
122
122
|
test('be_|ns|types', ()=>{
|
|
123
123
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
124
124
|
const ctx0 = ctx__new()
|
|
125
|
-
type test_ctx0_s = Expect<Equal<typeof ctx0.s,
|
|
125
|
+
type test_ctx0_s = Expect<Equal<typeof ctx0.s, ctx_s_T<''>>>
|
|
126
126
|
// @ts-expect-error TS2345
|
|
127
|
-
type test_ctx0_s_fail = Expect<Equal<typeof ctx0.s,
|
|
128
|
-
type test_ctx0 = Expect<Equal<typeof ctx0,
|
|
127
|
+
type test_ctx0_s_fail = Expect<Equal<typeof ctx0.s, ctx_s_T<'fail'>>>
|
|
128
|
+
type test_ctx0 = Expect<Equal<typeof ctx0, ctx_T<''>>>
|
|
129
129
|
// @ts-expect-error TS2345
|
|
130
|
-
type test_ctx0_fail = Expect<Equal<typeof ctx0,
|
|
130
|
+
type test_ctx0_fail = Expect<Equal<typeof ctx0, ctx_T<'fail'>>>
|
|
131
131
|
const ctx1 = ns_ctx__new('ctx1')
|
|
132
|
-
type test_ctx1_s = Expect<Equal<typeof ctx1.s,
|
|
132
|
+
type test_ctx1_s = Expect<Equal<typeof ctx1.s, ctx_s_T<'ctx1'>>>
|
|
133
133
|
// @ts-expect-error TS2345
|
|
134
|
-
type test_ctx1_fail = Expect<Equal<typeof ctx1,
|
|
134
|
+
type test_ctx1_fail = Expect<Equal<typeof ctx1, ctx_T<'fail'>>>
|
|
135
135
|
// @ts-expect-error TS2345
|
|
136
|
-
type test_ctx1_s_fail = Expect<Equal<typeof ctx1,
|
|
137
|
-
type test_ctx1_w_empty_string = Expect<Equal<typeof ctx1,
|
|
138
|
-
type test_ctx1 = Expect<Equal<typeof ctx1,
|
|
136
|
+
type test_ctx1_s_fail = Expect<Equal<typeof ctx1, ctx_s_T<''|'fail'>>>
|
|
137
|
+
type test_ctx1_w_empty_string = Expect<Equal<typeof ctx1, ctx_T<'ctx1'>>>
|
|
138
|
+
type test_ctx1 = Expect<Equal<typeof ctx1, ctx_T<'ctx1'>>>
|
|
139
139
|
const ctx = ns_ctx__new(ctx0, ctx1)
|
|
140
140
|
type test_ctx_s_wide_T = Expect<Equal<
|
|
141
|
-
typeof ctx.s, typeof ctx extends
|
|
141
|
+
typeof ctx.s, typeof ctx extends wide_ctx_s_T<''|'ctx1'>
|
|
142
142
|
? typeof ctx.s
|
|
143
143
|
: never>>
|
|
144
144
|
type test_ctx_s_BeMapO = Expect<Equal<
|
|
145
145
|
typeof ctx.s, typeof ctx.s extends BeMapO<''|'ctx1'>
|
|
146
146
|
? typeof ctx.s
|
|
147
147
|
: never>>
|
|
148
|
-
type test_ctx_s = Expect<Equal<typeof ctx.s,
|
|
148
|
+
type test_ctx_s = Expect<Equal<typeof ctx.s, ctx_s_T<''|'ctx1'>>>
|
|
149
149
|
type test_ctx_extends = Expect<Equal<
|
|
150
|
-
typeof ctx, typeof ctx extends
|
|
150
|
+
typeof ctx, typeof ctx extends wide_ctx_T<''|'ctx1'>
|
|
151
151
|
? typeof ctx
|
|
152
152
|
: never>>
|
|
153
|
-
type test_ctx_Ctx = Expect<Equal<typeof ctx,
|
|
153
|
+
type test_ctx_Ctx = Expect<Equal<typeof ctx, ctx_T<''|'ctx1'>>>
|
|
154
154
|
const root_ = be_<number, 'ctx1'>(
|
|
155
155
|
ctx=>{
|
|
156
|
-
type test_be_ctx_argument = Expect<Equal<typeof ctx,
|
|
156
|
+
type test_be_ctx_argument = Expect<Equal<typeof ctx, wide_ctx_T<'ctx1'>>>
|
|
157
157
|
return 1
|
|
158
158
|
}, {
|
|
159
159
|
ns: 'ctx1',
|
|
@@ -161,7 +161,7 @@ test('be_|ns|types', ()=>{
|
|
|
161
161
|
})
|
|
162
162
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
163
163
|
})
|
|
164
|
-
test('be_|
|
|
164
|
+
test('be_|ctx_T generic type', ()=>{
|
|
165
165
|
const valid_ctx = ns_ctx__new('test_ns')
|
|
166
166
|
const val_ = be_<boolean, 'test_ns'>(()=>
|
|
167
167
|
true,
|
|
@@ -170,11 +170,11 @@ test('be_|Ctx generic type', ()=>{
|
|
|
170
170
|
// @ts-expect-error TS2322
|
|
171
171
|
throws(()=>val_(ctx__new()))
|
|
172
172
|
})
|
|
173
|
-
test('be_|
|
|
173
|
+
test('be_|ctx_T|ns', ()=>{
|
|
174
174
|
const ctx0 = ctx__new()
|
|
175
175
|
const ctx1 = ctx__new()
|
|
176
176
|
const ctx = ns_ctx__new(ctx0, ctx1)
|
|
177
|
-
const nested__ctx_ = be_<[
|
|
177
|
+
const nested__ctx_ = be_<[ctx_T]>(ctx=>
|
|
178
178
|
[ctx],
|
|
179
179
|
{ id: 'nested__ctx_' })
|
|
180
180
|
equal(nested__ctx_(ctx), [ctx])
|
|
@@ -431,11 +431,11 @@ test('be__val_', ()=>{
|
|
|
431
431
|
equal(be__val_('val_', ns_ctx, 'test_ns'), true)
|
|
432
432
|
})
|
|
433
433
|
test('ondelete_be_', ()=>{
|
|
434
|
-
const ondelete0_arg_aa:[val:number, ctx:
|
|
435
|
-
const ondelete1_arg_aa:[val:number, ctx:
|
|
436
|
-
const _ondelete0 = (...arg_a:[val:number, ctx:
|
|
434
|
+
const ondelete0_arg_aa:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>][] = []
|
|
435
|
+
const ondelete1_arg_aa:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>][] = []
|
|
436
|
+
const _ondelete0 = (...arg_a:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>])=>
|
|
437
437
|
ondelete0_arg_aa.push(arg_a)
|
|
438
|
-
const _ondelete1 = (...arg_a:[val:number, ctx:
|
|
438
|
+
const _ondelete1 = (...arg_a:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>])=>
|
|
439
439
|
ondelete1_arg_aa.push(arg_a)
|
|
440
440
|
const be =
|
|
441
441
|
ondelete_be_<number>((ctx, { ondelete })=>{
|
|
@@ -458,11 +458,11 @@ test('ondelete_be_', ()=>{
|
|
|
458
458
|
equal(ondelete1_arg_aa, [[1, ctx, be], [1, ctx, be]])
|
|
459
459
|
})
|
|
460
460
|
test('ctx__clear', ()=>{
|
|
461
|
-
const ondelete0_arg_aa:[val:number, ctx:
|
|
462
|
-
const ondelete1_arg_aa:[val:number, ctx:
|
|
463
|
-
const _ondelete0 = (...arg_a:[val:number, ctx:
|
|
461
|
+
const ondelete0_arg_aa:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>][] = []
|
|
462
|
+
const ondelete1_arg_aa:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>][] = []
|
|
463
|
+
const _ondelete0 = (...arg_a:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>])=>
|
|
464
464
|
ondelete0_arg_aa.push(arg_a)
|
|
465
|
-
const _ondelete1 = (...arg_a:[val:number, ctx:
|
|
465
|
+
const _ondelete1 = (...arg_a:[val:number, ctx:ctx_T, be:Be<number, ''|'test_ns'>])=>
|
|
466
466
|
ondelete1_arg_aa.push(arg_a)
|
|
467
467
|
const be0 =
|
|
468
468
|
ondelete_be_<number>((ctx, { ondelete })=>{
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T, ctx__set_T,
|
|
1
|
+
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T, ctx__set_T, wide_ctx_T, } from '../be_/index.js'
|
|
2
2
|
import type { lock_memosig_T } from '../rmemo/index.js'
|
|
3
3
|
export declare function be_lock_memosig_triple_<
|
|
4
4
|
val_T,
|
|
5
5
|
ns_T extends string = '',
|
|
6
6
|
E = unknown,
|
|
7
|
-
ctx_T extends
|
|
7
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
8
8
|
>(be:Be<lock_memosig_T<val_T, E>, ns_T, ctx_T>):be_lock_memosig_triple_T<val_T, ns_T, E, ctx_T>
|
|
9
9
|
export declare function be_lock_memosig_triple_<
|
|
10
10
|
val_T,
|
|
11
11
|
ns_T extends string = '',
|
|
12
12
|
E = unknown,
|
|
13
|
-
ctx_T extends
|
|
13
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
14
14
|
>(
|
|
15
15
|
val__new:(ctx:ctx_T, lock_memosig:lock_memosig_T<val_T, E>)=>val_T,
|
|
16
16
|
...config:be_config_arg_a_T<ns_T>
|
|
@@ -19,7 +19,7 @@ export declare function ns_be_lock_memosig_triple_<
|
|
|
19
19
|
val_T,
|
|
20
20
|
ns_T extends string,
|
|
21
21
|
E = unknown,
|
|
22
|
-
ctx_T extends
|
|
22
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
23
23
|
>(
|
|
24
24
|
ns:ns_T,
|
|
25
25
|
val__new:(ctx:ctx_T, lock_memosig:lock_memosig_T<val_T, E>)=>val_T,
|
|
@@ -27,7 +27,7 @@ export declare function ns_be_lock_memosig_triple_<
|
|
|
27
27
|
export declare function id_be_lock_memosig_triple_<
|
|
28
28
|
val_T,
|
|
29
29
|
E = unknown,
|
|
30
|
-
ctx_T extends
|
|
30
|
+
ctx_T extends wide_ctx_T<''> = wide_ctx_T<''>,
|
|
31
31
|
>(
|
|
32
32
|
id:string,
|
|
33
33
|
val__new:(ctx:ctx_T, lock_memosig:lock_memosig_T<val_T, E>)=>val_T,
|
|
@@ -36,7 +36,7 @@ export declare function ns_id_be_lock_memosig_triple_<
|
|
|
36
36
|
val_T,
|
|
37
37
|
ns_T extends string,
|
|
38
38
|
E = unknown,
|
|
39
|
-
ctx_T extends
|
|
39
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
40
40
|
>(
|
|
41
41
|
ns:ns_T,
|
|
42
42
|
id:string,
|
|
@@ -46,7 +46,7 @@ export type be_lock_memosig_triple_T<
|
|
|
46
46
|
val_T,
|
|
47
47
|
ns_T extends string = '',
|
|
48
48
|
E = unknown,
|
|
49
|
-
ctx_T extends
|
|
49
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
50
50
|
> = [
|
|
51
51
|
ctx__be_T<lock_memosig_T<val_T, E>, ns_T, ctx_T>,
|
|
52
52
|
ctx__get_T<val_T, ns_T, ctx_T>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from 'uvu'
|
|
2
2
|
import { equal } from 'uvu/assert'
|
|
3
|
-
import { be_, type
|
|
3
|
+
import { be_, type wide_ctx_T } from '../be_/index.js'
|
|
4
4
|
import { be_sig_triple_ } from '../be_sig_triple/index.js'
|
|
5
5
|
import { ctx__new, ns_ctx__new } from '../ctx/index.js'
|
|
6
6
|
import { memo_, memosig_, type sig_T } from '../rmemo/index.js'
|
|
@@ -66,7 +66,7 @@ test('be_lock_memosig_triple_|+id|+ns', ()=>{
|
|
|
66
66
|
] = be_lock_memosig_triple_<number, 'test_ns'>(
|
|
67
67
|
ctx=>{
|
|
68
68
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
69
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
69
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
70
70
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
71
71
|
return base_(ctx) + 1
|
|
72
72
|
},
|
|
@@ -116,7 +116,7 @@ test('be_lock_memosig_triple_|+be', ()=>{
|
|
|
116
116
|
] = be_lock_memosig_triple_<number, 'test_ns', { custom: string }>(
|
|
117
117
|
be_(ctx=>{
|
|
118
118
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
119
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
119
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
120
120
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
121
121
|
const foobar$ =
|
|
122
122
|
memosig_<number, { custom: string }>(
|
|
@@ -178,7 +178,7 @@ test('ns_be_lock_memosig_triple_', ()=>{
|
|
|
178
178
|
'test_ns',
|
|
179
179
|
ctx=>{
|
|
180
180
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
181
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
181
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
182
182
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
183
183
|
return base_(ctx) + 1
|
|
184
184
|
},
|
|
@@ -230,7 +230,7 @@ test('id_be_lock_memosig_triple_', ()=>{
|
|
|
230
230
|
'foobar',
|
|
231
231
|
ctx=>{
|
|
232
232
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
233
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
233
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<''>>>
|
|
234
234
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
235
235
|
return base_(ctx) + 1
|
|
236
236
|
},
|
|
@@ -282,7 +282,7 @@ test('ns_id_be_lock_memosig_triple_', ()=>{
|
|
|
282
282
|
'foobar',
|
|
283
283
|
ctx=>{
|
|
284
284
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
285
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
285
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
286
286
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
287
287
|
return base_(ctx) + 1
|
|
288
288
|
},
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T,
|
|
1
|
+
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T, wide_ctx_T } from '../be_/index.js'
|
|
2
2
|
import type { memo_T, sig_T } from '../rmemo/index.js'
|
|
3
3
|
export declare function be_memo_pair_<
|
|
4
4
|
val_T,
|
|
5
5
|
ns_T extends string = '',
|
|
6
6
|
E = unknown,
|
|
7
|
-
ctx_T extends
|
|
7
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
8
8
|
>(be:Be<memo_T<val_T, E>, ns_T, ctx_T>):be_memo_pair_T<val_T, ns_T, E, ctx_T>
|
|
9
9
|
export declare function be_memo_pair_<
|
|
10
10
|
val_T,
|
|
11
11
|
ns_T extends string = '',
|
|
12
12
|
E = unknown,
|
|
13
|
-
ctx_T extends
|
|
13
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
14
14
|
>(
|
|
15
15
|
val__new:(ctx:ctx_T, memo:sig_T<val_T, E>)=>val_T,
|
|
16
16
|
...config:be_config_arg_a_T<ns_T>
|
|
@@ -19,7 +19,7 @@ export declare function ns_be_memo_pair_<
|
|
|
19
19
|
val_T,
|
|
20
20
|
ns_T extends string,
|
|
21
21
|
E = unknown,
|
|
22
|
-
ctx_T extends
|
|
22
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
23
23
|
>(
|
|
24
24
|
ns:ns_T,
|
|
25
25
|
val__new:(ctx:ctx_T, memo:sig_T<val_T, E>)=>val_T,
|
|
@@ -27,7 +27,7 @@ export declare function ns_be_memo_pair_<
|
|
|
27
27
|
export declare function id_be_memo_pair_<
|
|
28
28
|
val_T,
|
|
29
29
|
E = unknown,
|
|
30
|
-
ctx_T extends
|
|
30
|
+
ctx_T extends wide_ctx_T<''> = wide_ctx_T<''>,
|
|
31
31
|
>(
|
|
32
32
|
id:string,
|
|
33
33
|
val__new:(ctx:ctx_T, memo:sig_T<val_T, E>)=>val_T,
|
|
@@ -36,7 +36,7 @@ export declare function ns_id_be_memo_pair_<
|
|
|
36
36
|
val_T,
|
|
37
37
|
ns_T extends string,
|
|
38
38
|
E = unknown,
|
|
39
|
-
ctx_T extends
|
|
39
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
40
40
|
>(
|
|
41
41
|
ns:ns_T,
|
|
42
42
|
id:string,
|
|
@@ -46,7 +46,7 @@ export type be_memo_pair_T<
|
|
|
46
46
|
val_T,
|
|
47
47
|
ns_T extends string = '',
|
|
48
48
|
E = unknown,
|
|
49
|
-
ctx_T extends
|
|
49
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
50
50
|
> = [
|
|
51
51
|
ctx__be_T<memo_T<val_T, E>, ns_T, ctx_T>,
|
|
52
52
|
ctx__get_T<val_T, ns_T, ctx_T>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from 'uvu'
|
|
2
2
|
import { equal } from 'uvu/assert'
|
|
3
|
-
import { be_, type
|
|
3
|
+
import { be_, type wide_ctx_T } from '../be_/index.js'
|
|
4
4
|
import { be_sig_triple_ } from '../be_sig_triple/index.js'
|
|
5
5
|
import { ctx__new, ns_ctx__new } from '../ctx/index.js'
|
|
6
6
|
import { memo_, type memo_T } from '../rmemo/index.js'
|
|
@@ -20,7 +20,7 @@ test('be_memo_pair_', ()=>{
|
|
|
20
20
|
foobar$
|
|
21
21
|
)=>{
|
|
22
22
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
23
|
-
type test__ctx = Expect<Equal<typeof _ctx,
|
|
23
|
+
type test__ctx = Expect<Equal<typeof _ctx, wide_ctx_T<''>>>
|
|
24
24
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
25
25
|
equal(_ctx, ctx)
|
|
26
26
|
foobar$.count = (foobar$.count ||= 0) + 1
|
|
@@ -59,7 +59,7 @@ test('be_memo_pair_|+id|+ns|+add', ()=>{
|
|
|
59
59
|
{ id: 'foobar', ns: 'test_ns' }
|
|
60
60
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
61
61
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
62
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
62
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
63
63
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
64
64
|
add_count++
|
|
65
65
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -93,7 +93,7 @@ test('be_memo_pair_|add|receives a memosig to set the value of the memo', ()=>{
|
|
|
93
93
|
foobar_,
|
|
94
94
|
] = be_memo_pair_(ctx=>{
|
|
95
95
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
96
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
96
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<''>>>
|
|
97
97
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
98
98
|
return 1
|
|
99
99
|
}).add((ctx, foobar$)=>memo_(()=>{
|
|
@@ -120,7 +120,7 @@ test('be_memo_pair_|be', ()=>{
|
|
|
120
120
|
] = be_memo_pair_<number, 'test_ns', { custom: string }>(
|
|
121
121
|
be_(_ctx=>{
|
|
122
122
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
123
|
-
type test__ctx = Expect<Equal<typeof _ctx,
|
|
123
|
+
type test__ctx = Expect<Equal<typeof _ctx, wide_ctx_T<'test_ns'>>>
|
|
124
124
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
125
125
|
const foobar$ = memo_<number, { custom: string }>(
|
|
126
126
|
()=>base_(ctx) + 1
|
|
@@ -172,7 +172,7 @@ test('ns_be_memo_pair_', ()=>{
|
|
|
172
172
|
ctx=>base_(ctx) + 1,
|
|
173
173
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
174
174
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
175
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
175
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
176
176
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
177
177
|
add_count++
|
|
178
178
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -213,7 +213,7 @@ test('id_be_memo_pair_', ()=>{
|
|
|
213
213
|
ctx=>base_(ctx) + 1
|
|
214
214
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
215
215
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
216
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
216
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<''>>>
|
|
217
217
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
218
218
|
add_count++
|
|
219
219
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -255,7 +255,7 @@ test('ns_id_be_memo_pair_', ()=>{
|
|
|
255
255
|
ctx=>base_(ctx) + 1
|
|
256
256
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
257
257
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
258
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
258
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
259
259
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
260
260
|
add_count++
|
|
261
261
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T, ctx__set_T,
|
|
1
|
+
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T, ctx__set_T, wide_ctx_T } from '../be_/index.js'
|
|
2
2
|
import type { sig_T } from '../rmemo/index.js'
|
|
3
3
|
export declare function be_memosig_triple_<
|
|
4
4
|
val_T,
|
|
5
5
|
ns_T extends string = '',
|
|
6
6
|
E = unknown,
|
|
7
|
-
ctx_T extends
|
|
7
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
8
8
|
>(be:Be<sig_T<val_T, E>, ns_T, ctx_T>):be_memosig_triple_T<val_T, ns_T, E, ctx_T>
|
|
9
9
|
export declare function be_memosig_triple_<
|
|
10
10
|
val_T,
|
|
11
11
|
ns_T extends string = '',
|
|
12
12
|
E = unknown,
|
|
13
|
-
ctx_T extends
|
|
13
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
14
14
|
>(
|
|
15
15
|
val__new:(ctx:ctx_T, memosig:sig_T<val_T, E>)=>val_T,
|
|
16
16
|
...config:be_config_arg_a_T<ns_T>
|
|
@@ -19,7 +19,7 @@ export declare function ns_be_memosig_triple_<
|
|
|
19
19
|
val_T,
|
|
20
20
|
ns_T extends string,
|
|
21
21
|
E = unknown,
|
|
22
|
-
ctx_T extends
|
|
22
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
23
23
|
>(
|
|
24
24
|
ns:ns_T,
|
|
25
25
|
val__new:(ctx:ctx_T, memosig:sig_T<val_T, E>)=>val_T,
|
|
@@ -27,7 +27,7 @@ export declare function ns_be_memosig_triple_<
|
|
|
27
27
|
export declare function id_be_memosig_triple_<
|
|
28
28
|
val_T,
|
|
29
29
|
E = unknown,
|
|
30
|
-
ctx_T extends
|
|
30
|
+
ctx_T extends wide_ctx_T<''> = wide_ctx_T<''>,
|
|
31
31
|
>(
|
|
32
32
|
id:string,
|
|
33
33
|
val__new:(ctx:ctx_T, memosig:sig_T<val_T, E>)=>val_T,
|
|
@@ -36,7 +36,7 @@ export declare function ns_id_be_memosig_triple_<
|
|
|
36
36
|
val_T,
|
|
37
37
|
ns_T extends string,
|
|
38
38
|
E = unknown,
|
|
39
|
-
ctx_T extends
|
|
39
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
40
40
|
>(
|
|
41
41
|
ns:ns_T,
|
|
42
42
|
id:string,
|
|
@@ -46,7 +46,7 @@ export type be_memosig_triple_T<
|
|
|
46
46
|
val_T,
|
|
47
47
|
ns_T extends string = '',
|
|
48
48
|
E = unknown,
|
|
49
|
-
ctx_T extends
|
|
49
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
50
50
|
> = [
|
|
51
51
|
ctx__be_T<sig_T<val_T, E>, ns_T, ctx_T>,
|
|
52
52
|
ctx__get_T<val_T, ns_T, ctx_T>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from 'uvu'
|
|
2
2
|
import { equal } from 'uvu/assert'
|
|
3
|
-
import { be_, type
|
|
3
|
+
import { be_, type wide_ctx_T } from '../be_/index.js'
|
|
4
4
|
import { be_sig_triple_ } from '../be_sig_triple/index.js'
|
|
5
5
|
import { ctx__new, ns_ctx__new } from '../ctx/index.js'
|
|
6
6
|
import { memo_, memosig_, type sig_T } from '../rmemo/index.js'
|
|
@@ -20,7 +20,7 @@ test('be_memosig_triple_', ()=>{
|
|
|
20
20
|
count:number
|
|
21
21
|
}>((_ctx, foobar$)=>{
|
|
22
22
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
23
|
-
type test__ctx = Expect<Equal<typeof _ctx,
|
|
23
|
+
type test__ctx = Expect<Equal<typeof _ctx, wide_ctx_T<''>>>
|
|
24
24
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
25
25
|
equal(_ctx, ctx)
|
|
26
26
|
foobar$.count = (foobar$.count ||= 0) + 1
|
|
@@ -63,14 +63,14 @@ test('be_memosig_triple_|+id|+ns', ()=>{
|
|
|
63
63
|
] = be_memosig_triple_<number, 'test_ns'>(
|
|
64
64
|
ctx=>{
|
|
65
65
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
66
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
66
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
67
67
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
68
68
|
return base_(ctx) + 1
|
|
69
69
|
},
|
|
70
70
|
{ id: 'foobar', ns: 'test_ns' }
|
|
71
71
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
72
72
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
73
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
73
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
74
74
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
75
75
|
add_count++
|
|
76
76
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -116,7 +116,7 @@ test('be_memosig_triple_|+be', ()=>{
|
|
|
116
116
|
] = be_memosig_triple_<number, 'test_ns', { custom: string }>(
|
|
117
117
|
be_(ctx=>{
|
|
118
118
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
119
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
119
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
120
120
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
121
121
|
const foobar$ =
|
|
122
122
|
memosig_<number, { custom: string }>(
|
|
@@ -178,13 +178,13 @@ test('ns_be_memosig_triple_', ()=>{
|
|
|
178
178
|
'test_ns',
|
|
179
179
|
ctx=>{
|
|
180
180
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
181
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
181
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
182
182
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
183
183
|
return base_(ctx) + 1
|
|
184
184
|
}
|
|
185
185
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
186
186
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
187
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
187
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
188
188
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
189
189
|
add_count++
|
|
190
190
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -233,13 +233,13 @@ test('id_be_memosig_triple_', ()=>{
|
|
|
233
233
|
'foobar',
|
|
234
234
|
ctx=>{
|
|
235
235
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
236
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
236
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<''>>>
|
|
237
237
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
238
238
|
return base_(ctx) + 1
|
|
239
239
|
}
|
|
240
240
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
241
241
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
242
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
242
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<''>>>
|
|
243
243
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
244
244
|
add_count++
|
|
245
245
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -288,13 +288,13 @@ test('ns_id_be_memosig_triple_', ()=>{
|
|
|
288
288
|
'foobar',
|
|
289
289
|
ctx=>{
|
|
290
290
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
291
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
291
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
292
292
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
293
293
|
return base_(ctx) + 1
|
|
294
294
|
},
|
|
295
295
|
).add((ctx, foobar$)=>memo_(()=>{
|
|
296
296
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
297
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
297
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
298
298
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
299
299
|
add_count++
|
|
300
300
|
add_dep__set(ctx, add_count + foobar$())
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T, ctx__set_T,
|
|
1
|
+
import type { Be, be_config_arg_a_T, ctx__be_T, ctx__get_T, ctx__set_T, wide_ctx_T } from '../be_/index.js'
|
|
2
2
|
import type { sig_T } from '../rmemo/index.js'
|
|
3
3
|
export declare function be_sig_triple_<
|
|
4
4
|
val_T,
|
|
5
5
|
ns_T extends string = '',
|
|
6
6
|
E = unknown,
|
|
7
|
-
ctx_T extends
|
|
7
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
8
8
|
>(be:Be<sig_T<val_T, E>, ns_T, ctx_T>):be_sig_triple_T<val_T, ns_T, E, ctx_T>
|
|
9
9
|
export declare function be_sig_triple_<
|
|
10
10
|
val_T,
|
|
11
11
|
ns_T extends string = '',
|
|
12
12
|
E = unknown,
|
|
13
|
-
ctx_T extends
|
|
13
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
14
14
|
>(
|
|
15
15
|
val__new:(ctx:ctx_T, sig:sig_T<val_T, E>)=>val_T,
|
|
16
16
|
...config:be_config_arg_a_T<ns_T>
|
|
@@ -19,7 +19,7 @@ export declare function ns_be_sig_triple_<
|
|
|
19
19
|
val_T,
|
|
20
20
|
ns_T extends string,
|
|
21
21
|
E = unknown,
|
|
22
|
-
ctx_T extends
|
|
22
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
23
23
|
>(
|
|
24
24
|
ns:ns_T,
|
|
25
25
|
val__new:(ctx:ctx_T, sig:sig_T<val_T, E>)=>val_T,
|
|
@@ -27,7 +27,7 @@ export declare function ns_be_sig_triple_<
|
|
|
27
27
|
export declare function id_be_sig_triple_<
|
|
28
28
|
val_T,
|
|
29
29
|
E = unknown,
|
|
30
|
-
ctx_T extends
|
|
30
|
+
ctx_T extends wide_ctx_T<''> = wide_ctx_T<''>,
|
|
31
31
|
>(
|
|
32
32
|
id:string,
|
|
33
33
|
val__new:(ctx:ctx_T, sig:sig_T<val_T, E>)=>val_T,
|
|
@@ -36,7 +36,7 @@ export declare function ns_id_be_sig_triple_<
|
|
|
36
36
|
val_T,
|
|
37
37
|
ns_T extends string,
|
|
38
38
|
E = unknown,
|
|
39
|
-
ctx_T extends
|
|
39
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
40
40
|
>(
|
|
41
41
|
ns:ns_T,
|
|
42
42
|
id:string,
|
|
@@ -46,7 +46,7 @@ export type be_sig_triple_T<
|
|
|
46
46
|
val_T,
|
|
47
47
|
ns_T extends string = '',
|
|
48
48
|
E = unknown,
|
|
49
|
-
ctx_T extends
|
|
49
|
+
ctx_T extends wide_ctx_T<ns_T> = wide_ctx_T<ns_T>,
|
|
50
50
|
> = [
|
|
51
51
|
ctx__be_T<sig_T<val_T, E>, ns_T, ctx_T>,
|
|
52
52
|
ctx__get_T<val_T, ns_T, ctx_T>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from 'uvu'
|
|
2
2
|
import { equal } from 'uvu/assert'
|
|
3
|
-
import { be_, type
|
|
3
|
+
import { be_, type wide_ctx_T } from '../be_/index.js'
|
|
4
4
|
import { ctx__new, ns_ctx__new } from '../ctx/index.js'
|
|
5
5
|
import { memo_, sig_, type sig_T } from '../rmemo/index.js'
|
|
6
6
|
import type { Equal, Expect } from '../test/index.js'
|
|
@@ -12,7 +12,7 @@ test('be_sig_triple_', ()=>{
|
|
|
12
12
|
foobar__set,
|
|
13
13
|
] = be_sig_triple_(_ctx=>{
|
|
14
14
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
15
|
-
type test__ctx = Expect<Equal<typeof _ctx,
|
|
15
|
+
type test__ctx = Expect<Equal<typeof _ctx, wide_ctx_T<''>>>
|
|
16
16
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
17
17
|
equal(_ctx, ctx)
|
|
18
18
|
return 1
|
|
@@ -40,7 +40,7 @@ test('be_sig_triple_|+id|+ns|+add', ()=>{
|
|
|
40
40
|
] = be_sig_triple_<number, 'test_ns'>(
|
|
41
41
|
ctx=>{
|
|
42
42
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
43
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
43
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
44
44
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
45
45
|
return 1
|
|
46
46
|
}, { id: 'foobar', ns: 'test_ns' }
|
|
@@ -75,7 +75,7 @@ test('be_sig_triple_|+be', ()=>{
|
|
|
75
75
|
] = be_sig_triple_<number, 'test_ns', { custom:string }>(
|
|
76
76
|
be_(ctx=>{
|
|
77
77
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
78
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
78
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
79
79
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
80
80
|
const foobar$ =
|
|
81
81
|
sig_<number, { custom:string }>(
|
|
@@ -119,7 +119,7 @@ test('ns_be_sig_triple_', ()=>{
|
|
|
119
119
|
'test_ns',
|
|
120
120
|
ctx=>{
|
|
121
121
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
122
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
122
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
123
123
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
124
124
|
return 1
|
|
125
125
|
}
|
|
@@ -160,7 +160,7 @@ test('id_be_sig_triple_', ()=>{
|
|
|
160
160
|
'foobar',
|
|
161
161
|
ctx=>{
|
|
162
162
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
163
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
163
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<''>>>
|
|
164
164
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
165
165
|
return 1
|
|
166
166
|
}
|
|
@@ -201,7 +201,7 @@ test('ns_id_be_sig_triple_', ()=>{
|
|
|
201
201
|
'foobar',
|
|
202
202
|
ctx=>{
|
|
203
203
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
204
|
-
type test_ctx = Expect<Equal<typeof ctx,
|
|
204
|
+
type test_ctx = Expect<Equal<typeof ctx, wide_ctx_T<'test_ns'>>>
|
|
205
205
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
206
206
|
return 1
|
|
207
207
|
}).add((ctx, foobar$)=>memo_(()=>{
|
package/all/ctx/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ctx_T } from '../be_/index.js'
|
|
2
2
|
import type { TupleToUnion } from '../tuple/index.js'
|
|
3
|
-
export declare function ctx__new():
|
|
3
|
+
export declare function ctx__new():ctx_T<''>
|
|
4
4
|
export { ctx__new as ctx_ }
|
|
5
5
|
export declare function ns_ctx__new<
|
|
6
|
-
ns0_T extends string|
|
|
7
|
-
ns_a_T extends (string|
|
|
6
|
+
ns0_T extends string|ctx_T,
|
|
7
|
+
ns_a_T extends (string|ctx_T)[]
|
|
8
8
|
>(
|
|
9
9
|
ns0:ns0_T,
|
|
10
10
|
...ns_a:ns_a_T
|
|
11
|
-
):
|
|
11
|
+
):ctx_T<Exclude<TupleToUnion<ns_a__flat_T<[ns0_T]>>|TupleToUnion<ns_a__flat_T<ns_a_T>>, undefined>>
|
|
12
12
|
export { ns_ctx__new as ns_ctx_ }
|
|
13
13
|
export declare function is_ctx_(val:unknown):boolean
|
|
14
14
|
/**
|
|
15
15
|
* Prepare for ns_union_T. Prevents type widening.
|
|
16
16
|
*/
|
|
17
|
-
type ns_a__flat_T<ns_a_T extends (string|
|
|
17
|
+
type ns_a__flat_T<ns_a_T extends (string|ctx_T)[]> =
|
|
18
18
|
ns_a_T extends []
|
|
19
19
|
? []
|
|
20
|
-
: ns_a_T extends [infer ns, ...infer tail extends (string|
|
|
21
|
-
? ns extends
|
|
20
|
+
: ns_a_T extends [infer ns, ...infer tail extends (string|ctx_T)[]]
|
|
21
|
+
? ns extends ctx_T
|
|
22
22
|
? [ns['ns_T'], ...ns_a__flat_T<tail>]
|
|
23
23
|
: [ns, ...ns_a__flat_T<tail>]
|
|
24
24
|
: string[]
|
package/all/ctx/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="../be_/index.d.ts" />
|
|
2
2
|
/**
|
|
3
|
-
* @returns {
|
|
3
|
+
* @returns {ctx_T}
|
|
4
4
|
* @private
|
|
5
5
|
*/
|
|
6
6
|
export function ctx__new() {
|
|
@@ -8,8 +8,8 @@ export function ctx__new() {
|
|
|
8
8
|
}
|
|
9
9
|
export { ctx__new as ctx_ }
|
|
10
10
|
/**
|
|
11
|
-
* @param {string|
|
|
12
|
-
* @returns {
|
|
11
|
+
* @param {string|ctx_T}[ns_a]
|
|
12
|
+
* @returns {ctx_T}
|
|
13
13
|
* @private
|
|
14
14
|
*/
|
|
15
15
|
export function ns_ctx__new(...ns_a) {
|
package/all/ctx/index.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { test } from 'uvu'
|
|
2
2
|
import { equal, is } from 'uvu/assert'
|
|
3
|
-
import { type
|
|
3
|
+
import { type ctx_T, type ctx_s_T } from '../be_/index.js'
|
|
4
4
|
import { ctx__new, is_ctx_, ns_ctx_, ns_ctx__new } from '../ctx/index.js'
|
|
5
5
|
import type { Equal, Expect } from '../test/index.js'
|
|
6
6
|
test('ctx__new', ()=>{
|
|
@@ -18,17 +18,17 @@ test('source_ctx__new', ()=>{
|
|
|
18
18
|
test('ns_ctx__new|types', ()=>{
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
20
20
|
const empty_ctx = ns_ctx__new('')
|
|
21
|
-
type test_empty_ctx = Expect<Equal<typeof empty_ctx,
|
|
21
|
+
type test_empty_ctx = Expect<Equal<typeof empty_ctx, ctx_T<''>>>
|
|
22
22
|
const single_ctx = ns_ctx__new('test_ns')
|
|
23
|
-
type test_single_ctx = Expect<Equal<typeof single_ctx,
|
|
23
|
+
type test_single_ctx = Expect<Equal<typeof single_ctx, ctx_T<'test_ns'>>>
|
|
24
24
|
// @ts-expect-error TS2345
|
|
25
|
-
type test_single_ctx_fail = Expect<Equal<typeof single_ctx,
|
|
25
|
+
type test_single_ctx_fail = Expect<Equal<typeof single_ctx, ctx_T<'fail'>>>
|
|
26
26
|
const triple_ctx =
|
|
27
27
|
ns_ctx__new('test_ns', empty_ctx, 'test_ns2')
|
|
28
|
-
type test_triple_ctx = Expect<Equal<typeof triple_ctx,
|
|
28
|
+
type test_triple_ctx = Expect<Equal<typeof triple_ctx, ctx_T<''|'test_ns'|'test_ns2'>>>
|
|
29
29
|
// @ts-expect-error TS2345
|
|
30
|
-
type test_triple_ctx_fail = Expect<Equal<typeof triple_ctx,
|
|
31
|
-
type test_triple_ctx_s = Expect<Equal<typeof triple_ctx.s,
|
|
30
|
+
type test_triple_ctx_fail = Expect<Equal<typeof triple_ctx, ctx_T<''|'test_ns'|'test_ns2'|'fail'>>>
|
|
31
|
+
type test_triple_ctx_s = Expect<Equal<typeof triple_ctx.s, ctx_s_T<''|'test_ns'|'test_ns2'>>>
|
|
32
32
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
33
33
|
})
|
|
34
34
|
test('is_ctx_', ()=>{
|
package/all/event_log/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ctx_T } from '../be_/index.js'
|
|
2
2
|
import type { be_memo_pair_T } from '../be_memo_pair/index.js'
|
|
3
3
|
import type { be_sig_triple_T } from '../be_sig_triple/index.js'
|
|
4
4
|
import type { memo_T } from '../rmemo/index.js'
|
|
@@ -8,7 +8,7 @@ export declare const [
|
|
|
8
8
|
]:be_memo_pair_T<event_log__T>
|
|
9
9
|
export { event_log$_ as event_log__ }
|
|
10
10
|
export declare function event_log__add<I = unknown>(
|
|
11
|
-
ctx:
|
|
11
|
+
ctx:ctx_T,
|
|
12
12
|
record:event_log_record_T<I>
|
|
13
13
|
):void
|
|
14
14
|
export declare const [
|
|
@@ -16,7 +16,7 @@ export declare const [
|
|
|
16
16
|
event_log_limit_,
|
|
17
17
|
event_log_limit__set,
|
|
18
18
|
]:be_sig_triple_T<number>
|
|
19
|
-
export declare function event_log__set_limit(ctx:
|
|
19
|
+
export declare function event_log__set_limit(ctx:ctx_T, limit:number):void
|
|
20
20
|
export interface event_log_record_T<I = unknown> extends Record<string, I> {}
|
|
21
21
|
export declare type event_log_T<I = unknown> = event_log_record_T<I>[]
|
|
22
22
|
export declare type event_log_add_T<I = unknown> =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare function window__ctx__set(ctx:
|
|
1
|
+
import { type wide_ctx_T } from '../be_/index.js'
|
|
2
|
+
export declare function window__ctx__set(ctx:wide_ctx_T<''>):void
|
|
3
3
|
declare global {
|
|
4
4
|
interface Window {
|
|
5
5
|
ctx__get<V>(key:string, ns?:string):V
|