ajo 0.1.19 → 0.1.20
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/html.cjs +1 -1
- package/dist/html.js +21 -21
- package/dist/index.cjs +1 -1
- package/dist/index.js +61 -66
- package/package.json +1 -1
- package/readme.md +1 -1
- package/types.ts +5 -5
package/dist/html.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const{
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const{isArray:$,from:p}=Array,m="",{create:g,assign:v,entries:x,prototype:{hasOwnProperty:w},hasOwn:S=(e,t)=>w.call(e,t)}=Object,c=e=>p(d(e)).join(""),d=function*(e){for(e of u(e))if(typeof e=="string")yield f(e);else{const{nodeName:t,skip:o,children:r=""}=e;let n="";for(const[i,s]of x(e))k.has(i)||i.startsWith("set:")||s==null||s===!1||(n+=s===!0?` ${i}`:` ${i}="${f(String(s))}"`);N.has(t)?yield`<${t}${n}>`:o?yield`<${t}${n}></${t}>`:(yield`<${t}${n}>`,typeof r=="string"&&r.startsWith(m)?yield r.slice(1):yield*d(r),yield`</${t}>`)}},u=function*(e,t={value:""},o=!0){for(e of $(e)?e:[e])if(!(e==null||typeof e=="boolean"))if(S(e,"nodeName")){const{value:r}=t,{nodeName:n}=e;if(r&&(yield r,t.value=""),typeof n=="function")if(n.constructor.name==="GeneratorFunction"){const i={},s=v({},n.attrs);for(const a in e){const y=e[a];a.startsWith("attr:")?s[a.slice(5)]=y:i[a]=y}s.nodeName=n.is??"div",s.children=O(n,i),yield s}else yield*u(n(e),t,!1);else yield e}else $(e)?yield*u(e,t,!1):t.value+=e;o&&t.value&&(yield t.value)},N=new Set("area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",")),k=new Set("nodeName,key,skip,memo,ref,children".split(",")),f=e=>e.replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`);let l=null;const O=(e,t)=>{let o,r;try{const n=e.call(o={$args:t,$context:g((l==null?void 0:l.$context)??null),render(){l!==o&&o.$next()},$next(){const i=l;l=o,r=c(n.next().value),l=i},$throw(i){r=c(n.throw(i).value)},$return(){n.return()}},t);o.$next()}catch(n){o.$throw(n)}finally{o.$return()}return m+r},j=(e,t=Symbol())=>function(o,r){return arguments.length===0?l&&t in l.$context?l.$context[t]:e:arguments.length===1?t in o.$context?o.$context[t]:e:o.$context[t]=r};exports.context=j;exports.html=d;exports.render=c;
|
package/dist/html.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { isArray: d, from: p } = Array, f = "", { create: x, assign: v, entries: g, prototype: { hasOwnProperty: w }, hasOwn: N = (e, t) => w.call(e, t) } = Object, $ = (e) => p(m(e)).join(""), m = function* (e) {
|
|
2
2
|
for (e of c(e))
|
|
3
|
-
if (typeof e == "string") yield
|
|
3
|
+
if (typeof e == "string") yield y(e);
|
|
4
4
|
else {
|
|
5
5
|
const { nodeName: t, skip: o, children: r = "" } = e;
|
|
6
6
|
let n = "";
|
|
7
|
-
for (const [i,
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (const [i, s] of g(e))
|
|
8
|
+
S.has(i) || i.startsWith("set:") || s == null || s === !1 || (n += s === !0 ? ` ${i}` : ` ${i}="${y(String(s))}"`);
|
|
9
|
+
k.has(t) ? yield `<${t}${n}>` : o ? yield `<${t}${n}></${t}>` : (yield `<${t}${n}>`, typeof r == "string" && r.startsWith(f) ? yield r.slice(1) : yield* m(r), yield `</${t}>`);
|
|
10
10
|
}
|
|
11
11
|
}, c = function* (e, t = { value: "" }, o = !0) {
|
|
12
12
|
for (e of d(e) ? e : [e])
|
|
13
13
|
if (!(e == null || typeof e == "boolean"))
|
|
14
|
-
if (
|
|
14
|
+
if (N(e, "nodeName")) {
|
|
15
15
|
const { value: r } = t, { nodeName: n } = e;
|
|
16
16
|
if (r && (yield r, t.value = ""), typeof n == "function")
|
|
17
17
|
if (n.constructor.name === "GeneratorFunction") {
|
|
18
|
-
const i = {},
|
|
18
|
+
const i = {}, s = v({}, n.attrs);
|
|
19
19
|
for (const a in e) {
|
|
20
20
|
const u = e[a];
|
|
21
|
-
a.startsWith("attr:") ?
|
|
21
|
+
a.startsWith("attr:") ? s[a.slice(5)] = u : i[a] = u;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
s.nodeName = n.is ?? "div", s.children = A(n, i), yield s;
|
|
24
24
|
} else yield* c(n(e), t, !1);
|
|
25
25
|
else yield e;
|
|
26
26
|
} else d(e) ? yield* c(e, t, !1) : t.value += e;
|
|
27
27
|
o && t.value && (yield t.value);
|
|
28
|
-
},
|
|
29
|
-
let
|
|
30
|
-
const
|
|
28
|
+
}, k = new Set("area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",")), S = new Set("nodeName,key,skip,memo,ref,children".split(",")), y = (e) => e.replace(/[&<>"']/g, (t) => `&#${t.charCodeAt(0)};`);
|
|
29
|
+
let l = null;
|
|
30
|
+
const A = (e, t) => {
|
|
31
31
|
let o, r;
|
|
32
32
|
try {
|
|
33
33
|
const n = e.call(o = {
|
|
34
34
|
$args: t,
|
|
35
|
-
$context:
|
|
35
|
+
$context: x((l == null ? void 0 : l.$context) ?? null),
|
|
36
36
|
render() {
|
|
37
|
-
|
|
37
|
+
l !== o && o.$next();
|
|
38
38
|
},
|
|
39
39
|
$next() {
|
|
40
|
-
const i =
|
|
41
|
-
|
|
40
|
+
const i = l;
|
|
41
|
+
l = o, r = $(n.next().value), l = i;
|
|
42
42
|
},
|
|
43
43
|
$throw(i) {
|
|
44
|
-
r =
|
|
44
|
+
r = $(n.throw(i).value);
|
|
45
45
|
},
|
|
46
46
|
$return() {
|
|
47
47
|
n.return();
|
|
@@ -54,11 +54,11 @@ const S = (e, t) => {
|
|
|
54
54
|
o.$return();
|
|
55
55
|
}
|
|
56
56
|
return f + r;
|
|
57
|
-
},
|
|
58
|
-
return arguments.length === 1 ? t in o.$context ? o.$context[t] : e : o.$context[t] = r;
|
|
57
|
+
}, O = (e, t = Symbol()) => function(o, r) {
|
|
58
|
+
return arguments.length === 0 ? l && t in l.$context ? l.$context[t] : e : arguments.length === 1 ? t in o.$context ? o.$context[t] : e : o.$context[t] = r;
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
O as context,
|
|
62
62
|
m as html,
|
|
63
|
-
|
|
63
|
+
$ as render
|
|
64
64
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=({children:t})=>t,N=function(t,n){const{length:e}=arguments;return(n??(n=h(null))).nodeName=t,"children"in n||e<3||(n.children=e===3?arguments[2]:b.call(arguments,2)),n},d=(t,n)=>{let e=n.firstChild;for(t of g(t)){let i=e;if(typeof t=="string"){for(;i&&i.nodeType!=3;)i=i.nextSibling;i?i.data!=t&&(i.data=t):i=document.createTextNode(t)}else{const{nodeName:o,key:l,skip:c,memo:r,ref:f,children:w}=t;for(;i&&!(i.localName===o&&(i.$key??(i.$key=l))==l);)i=i.nextSibling;if(i??(i=m(document.createElementNS(t.xmlns??o==="svg"?O:n.namespaceURI,o),{$key:l})),r==null||F(i.$memo,i.$memo=r)){const{$props:$}=i,x={};for(const a of p(m({},$,t))){if(T.has(a))continue;const u=x[a]=t[a];u!==($==null?void 0:$[a])&&(a.startsWith("set:")?i[a.slice(4)]=u:u==null||u===!1?i.removeAttribute(a):i.setAttribute(a,u===!0?"":u))}i.$props=x,c||d(w,i),typeof f=="function"&&(i.$ref=f)(i)}}i===e?e=e.nextSibling:C(n,i,e)}for(;e;){const i=e.nextSibling;e.nodeType===1&&v(e),n.removeChild(e),e=i}},{isArray:y,prototype:{slice:b}}=Array,{create:h,assign:m,keys:p,prototype:{hasOwnProperty:k},hasOwn:A=(t,n)=>k.call(t,n)}=Object,O="http://www.w3.org/2000/svg",T=new Set("nodeName,key,skip,memo,ref,children".split(",")),F=(t,n)=>y(t)&&y(n)?t.some((e,i)=>e!==n[i]):t!==n,g=function*(t,n={value:""},e=!0){for(t of y(t)?t:[t])if(!(t==null||typeof t=="boolean"))if(A(t,"nodeName")){const{value:i}=n,{nodeName:o}=t;if(i&&(yield i,n.value=""),typeof o=="function")if(o.constructor.name==="GeneratorFunction"){const l={},c=m({},o.attrs);for(const r of p(t)){const f=t[r];r.startsWith("attr:")?c[r.slice(5)]=f:r==="key"||r==="memo"?c[r]=f:l[r]=f}c.nodeName=o.is??"div",c.skip=!0,c.ref=j.bind(null,o,l),yield c}else yield*g(o(t),n,!1);else yield t}else y(t)?yield*g(t,n,!1):n.value+=t;e&&n.value&&(yield n.value)},j=(t,n,e)=>{if(!e)return;e.$gen??(e.$gen=(m(e,E),e.$context??(e.$context=h((s==null?void 0:s.$context)??null)),t)),e.$ref=B.bind(null,e);const{skip:i,...o}=n;m(e.$args??(e.$args={}),o),i||e.$next()},B=(t,n)=>n??t.$return(),C=(t,n,e)=>{if(n.contains(document.activeElement)){const i=n.nextSibling;for(;e&&e!=n;){const o=e.nextSibling;t.insertBefore(e,i),e=o}}else t.insertBefore(n,e)},v=t=>{for(const e of t.children)v(e);const{$ref:n}=t;typeof n=="function"&&n(null)};let s=null;const E={render(){s!=null&&s.contains(this)||this.$next()},$next(){const t=s;s=this;try{d((this.$it??(this.$it=this.$gen.call(this,this.$args))).next().value,this),typeof this.$ref=="function"&&this.$ref(this)}catch(n){this.$throw(n)}finally{s=t}},$throw(t){var n;for(let e=this;e;e=e.parentNode)if(typeof((n=e.$it)==null?void 0:n.throw)=="function")try{return d(e.$it.throw(t).value,e)}catch{}throw t},$return(){var t;try{(t=this.$it)==null||t.return()}catch(n){this.$throw(n)}finally{this.$it=null}}},P=(t,n=Symbol())=>function(e,i){return arguments.length===0?s&&n in s.$context?s.$context[n]:t:arguments.length===1?n in e.$context?e.$context[n]:t:e.$context[n]=i};exports.Fragment=S;exports.context=P;exports.h=N;exports.render=d;
|
package/dist/index.js
CHANGED
|
@@ -1,111 +1,106 @@
|
|
|
1
|
-
const
|
|
1
|
+
const F = ({ children: t }) => t, W = function(t, n) {
|
|
2
2
|
const { length: e } = arguments;
|
|
3
|
-
return (
|
|
4
|
-
}, d = (
|
|
5
|
-
let e =
|
|
6
|
-
for (
|
|
3
|
+
return (n ?? (n = h(null))).nodeName = t, "children" in n || e < 3 || (n.children = e === 3 ? arguments[2] : N.call(arguments, 2)), n;
|
|
4
|
+
}, d = (t, n) => {
|
|
5
|
+
let e = n.firstChild;
|
|
6
|
+
for (t of g(t)) {
|
|
7
7
|
let i = e;
|
|
8
|
-
if (typeof
|
|
8
|
+
if (typeof t == "string") {
|
|
9
9
|
for (; i && i.nodeType != 3; ) i = i.nextSibling;
|
|
10
|
-
i ? i.data !=
|
|
10
|
+
i ? i.data != t && (i.data = t) : i = document.createTextNode(t);
|
|
11
11
|
} else {
|
|
12
|
-
const { nodeName: o, key:
|
|
13
|
-
for (; i && !(i.localName === o && (i.$key ?? (i.$key =
|
|
14
|
-
if (i ?? (i =
|
|
15
|
-
const { $props:
|
|
16
|
-
for (const
|
|
17
|
-
if (
|
|
18
|
-
const u = x[
|
|
19
|
-
u !== (
|
|
12
|
+
const { nodeName: o, key: l, skip: c, memo: r, ref: f, children: w } = t;
|
|
13
|
+
for (; i && !(i.localName === o && (i.$key ?? (i.$key = l)) == l); ) i = i.nextSibling;
|
|
14
|
+
if (i ?? (i = m(document.createElementNS(t.xmlns ?? o === "svg" ? b : n.namespaceURI, o), { $key: l })), r == null || O(i.$memo, i.$memo = r)) {
|
|
15
|
+
const { $props: $ } = i, x = {};
|
|
16
|
+
for (const a of p(m({}, $, t))) {
|
|
17
|
+
if (A.has(a)) continue;
|
|
18
|
+
const u = x[a] = t[a];
|
|
19
|
+
u !== ($ == null ? void 0 : $[a]) && (a.startsWith("set:") ? i[a.slice(4)] = u : u == null || u === !1 ? i.removeAttribute(a) : i.setAttribute(a, u === !0 ? "" : u));
|
|
20
20
|
}
|
|
21
|
-
i.$props = x, c || d(
|
|
21
|
+
i.$props = x, c || d(w, i), typeof f == "function" && (i.$ref = f)(i);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
i === e ? e = e.nextSibling :
|
|
24
|
+
i === e ? e = e.nextSibling : C(n, i, e);
|
|
25
25
|
}
|
|
26
26
|
for (; e; ) {
|
|
27
27
|
const i = e.nextSibling;
|
|
28
|
-
e.nodeType === 1 &&
|
|
28
|
+
e.nodeType === 1 && v(e), n.removeChild(e), e = i;
|
|
29
29
|
}
|
|
30
|
-
}, { isArray:
|
|
31
|
-
for (
|
|
32
|
-
if (!(
|
|
33
|
-
if (
|
|
34
|
-
const { value: i } =
|
|
35
|
-
if (i && (yield i,
|
|
30
|
+
}, { isArray: y, prototype: { slice: N } } = Array, { create: h, assign: m, keys: p, prototype: { hasOwnProperty: S }, hasOwn: k = (t, n) => S.call(t, n) } = Object, b = "http://www.w3.org/2000/svg", A = new Set("nodeName,key,skip,memo,ref,children".split(",")), O = (t, n) => y(t) && y(n) ? t.some((e, i) => e !== n[i]) : t !== n, g = function* (t, n = { value: "" }, e = !0) {
|
|
31
|
+
for (t of y(t) ? t : [t])
|
|
32
|
+
if (!(t == null || typeof t == "boolean"))
|
|
33
|
+
if (k(t, "nodeName")) {
|
|
34
|
+
const { value: i } = n, { nodeName: o } = t;
|
|
35
|
+
if (i && (yield i, n.value = ""), typeof o == "function")
|
|
36
36
|
if (o.constructor.name === "GeneratorFunction") {
|
|
37
|
-
const
|
|
38
|
-
for (const r of
|
|
39
|
-
const f =
|
|
40
|
-
r.startsWith("attr:") ? c[r.slice(5)] = f : r === "key" || r === "memo" ? c[r] = f :
|
|
37
|
+
const l = {}, c = m({}, o.attrs);
|
|
38
|
+
for (const r of p(t)) {
|
|
39
|
+
const f = t[r];
|
|
40
|
+
r.startsWith("attr:") ? c[r.slice(5)] = f : r === "key" || r === "memo" ? c[r] = f : l[r] = f;
|
|
41
41
|
}
|
|
42
|
-
c.nodeName = o.is ?? "div", c.skip = !0, c.ref = T.bind(null, o,
|
|
43
|
-
} else yield* g(o(
|
|
44
|
-
else yield
|
|
45
|
-
} else
|
|
46
|
-
e &&
|
|
47
|
-
}, T = (
|
|
42
|
+
c.nodeName = o.is ?? "div", c.skip = !0, c.ref = T.bind(null, o, l), yield c;
|
|
43
|
+
} else yield* g(o(t), n, !1);
|
|
44
|
+
else yield t;
|
|
45
|
+
} else y(t) ? yield* g(t, n, !1) : n.value += t;
|
|
46
|
+
e && n.value && (yield n.value);
|
|
47
|
+
}, T = (t, n, e) => {
|
|
48
48
|
if (!e) return;
|
|
49
|
-
e.$gen ?? (e.$gen = (
|
|
50
|
-
const { skip: i, ...o } =
|
|
51
|
-
|
|
52
|
-
}, B = (
|
|
53
|
-
if (
|
|
54
|
-
const i =
|
|
55
|
-
for (; e && e !=
|
|
49
|
+
e.$gen ?? (e.$gen = (m(e, E), e.$context ?? (e.$context = h((s == null ? void 0 : s.$context) ?? null)), t)), e.$ref = B.bind(null, e);
|
|
50
|
+
const { skip: i, ...o } = n;
|
|
51
|
+
m(e.$args ?? (e.$args = {}), o), i || e.$next();
|
|
52
|
+
}, B = (t, n) => n ?? t.$return(), C = (t, n, e) => {
|
|
53
|
+
if (n.contains(document.activeElement)) {
|
|
54
|
+
const i = n.nextSibling;
|
|
55
|
+
for (; e && e != n; ) {
|
|
56
56
|
const o = e.nextSibling;
|
|
57
|
-
|
|
57
|
+
t.insertBefore(e, i), e = o;
|
|
58
58
|
}
|
|
59
|
-
} else
|
|
60
|
-
},
|
|
61
|
-
for (const e of
|
|
62
|
-
const { $ref:
|
|
63
|
-
typeof
|
|
59
|
+
} else t.insertBefore(n, e);
|
|
60
|
+
}, v = (t) => {
|
|
61
|
+
for (const e of t.children) v(e);
|
|
62
|
+
const { $ref: n } = t;
|
|
63
|
+
typeof n == "function" && n(null);
|
|
64
64
|
};
|
|
65
65
|
let s = null;
|
|
66
|
-
|
|
67
|
-
constructor(t) {
|
|
68
|
-
p(t, p(h(this), h(t))), t.$context = v((s == null ? void 0 : s.$context) ?? null);
|
|
69
|
-
}
|
|
66
|
+
const E = {
|
|
70
67
|
render() {
|
|
71
68
|
s != null && s.contains(this) || this.$next();
|
|
72
|
-
}
|
|
69
|
+
},
|
|
73
70
|
$next() {
|
|
74
71
|
const t = s;
|
|
75
72
|
s = this;
|
|
76
73
|
try {
|
|
77
74
|
d((this.$it ?? (this.$it = this.$gen.call(this, this.$args))).next().value, this), typeof this.$ref == "function" && this.$ref(this);
|
|
78
|
-
} catch (
|
|
79
|
-
this.$throw(
|
|
75
|
+
} catch (n) {
|
|
76
|
+
this.$throw(n);
|
|
80
77
|
} finally {
|
|
81
78
|
s = t;
|
|
82
79
|
}
|
|
83
|
-
}
|
|
80
|
+
},
|
|
84
81
|
$throw(t) {
|
|
85
|
-
var
|
|
86
|
-
for (let
|
|
87
|
-
return d(
|
|
82
|
+
var n;
|
|
83
|
+
for (let e = this; e; e = e.parentNode) if (typeof ((n = e.$it) == null ? void 0 : n.throw) == "function") try {
|
|
84
|
+
return d(e.$it.throw(t).value, e);
|
|
88
85
|
} catch {
|
|
89
86
|
}
|
|
90
87
|
throw t;
|
|
91
|
-
}
|
|
88
|
+
},
|
|
92
89
|
$return() {
|
|
93
90
|
var t;
|
|
94
91
|
try {
|
|
95
92
|
(t = this.$it) == null || t.return();
|
|
96
|
-
} catch (
|
|
97
|
-
this.$throw(
|
|
93
|
+
} catch (n) {
|
|
94
|
+
this.$throw(n);
|
|
98
95
|
} finally {
|
|
99
96
|
this.$it = null;
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const { length: o } = arguments;
|
|
105
|
-
return o === 0 ? s && t in s.$context ? s.$context[t] : n : o === 1 ? t in e.$context ? e.$context[t] : n : e.$context[t] = i;
|
|
99
|
+
}, j = (t, n = Symbol()) => function(e, i) {
|
|
100
|
+
return arguments.length === 0 ? s && n in s.$context ? s.$context[n] : t : arguments.length === 1 ? n in e.$context ? e.$context[n] : t : e.$context[n] = i;
|
|
106
101
|
};
|
|
107
102
|
export {
|
|
108
|
-
|
|
103
|
+
F as Fragment,
|
|
109
104
|
j as context,
|
|
110
105
|
W as h,
|
|
111
106
|
d as render
|
package/package.json
CHANGED
package/readme.md
CHANGED
package/types.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare module 'ajo' {
|
|
|
6
6
|
|
|
7
7
|
type Props = Record<string, unknown>
|
|
8
8
|
|
|
9
|
-
type
|
|
9
|
+
type VNode<TTag extends Type> = { nodeName: TTag } & TagProps<TTag>
|
|
10
10
|
|
|
11
11
|
type Children = any
|
|
12
12
|
|
|
@@ -31,7 +31,7 @@ declare module 'ajo' {
|
|
|
31
31
|
[K in keyof TAttribute as `attr:${Exclude<K, symbol>}`]: TAttribute[K]
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
type
|
|
34
|
+
type ComponentThis<TArguments = Props> = {
|
|
35
35
|
$args: TArguments,
|
|
36
36
|
$context: { [key: symbol]: unknown },
|
|
37
37
|
render: () => void,
|
|
@@ -43,7 +43,7 @@ declare module 'ajo' {
|
|
|
43
43
|
type Function<TArguments = Props> = (args: TArguments) => Children
|
|
44
44
|
|
|
45
45
|
type Component<TArguments = Props, TTag extends Tag = 'div'> = {
|
|
46
|
-
(this: ElementType<TTag> &
|
|
46
|
+
(this: ElementType<TTag> & ComponentThis<TArguments>, args: TArguments): Iterator<Children, unknown, unknown>
|
|
47
47
|
} & (TTag extends 'div' ? { is?: TTag } : { is: TTag })
|
|
48
48
|
|
|
49
49
|
type Ref<TComponent> = TComponent extends Component<infer TArguments, infer TTag>
|
|
@@ -67,9 +67,9 @@ declare module 'ajo' {
|
|
|
67
67
|
: never
|
|
68
68
|
|
|
69
69
|
function Fragment({ children }: ElementChildrenAttribute): typeof children
|
|
70
|
-
function h<TTag extends Tag>(tag: TTag, props?: TagProps<TTag> | null, ...children: Array<unknown>):
|
|
70
|
+
function h<TTag extends Tag>(tag: TTag, props?: TagProps<TTag> | null, ...children: Array<unknown>): VNode<TTag>
|
|
71
71
|
function render(h: Children, el: Element): void
|
|
72
|
-
function context<T>(fallback?: T):
|
|
72
|
+
function context<T>(fallback?: T): (el?: ThisParameterType<Component<unknown, Tag>>, value?: T) => T
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
declare namespace JSX {
|