diff options
author | 2022-05-20 00:45:51 -0700 | |
---|---|---|
committer | 2022-05-20 00:45:51 -0700 | |
commit | 99d61877d6f411f33e0db578f04b333fb2110ddd (patch) | |
tree | 8802bd59e55c8ed3b5eec695209e59fd28ddfef4 /integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js | |
parent | 224cfa91fb550d3acb5d5fefdcc0594d7a12f1dc (diff) | |
download | bun-99d61877d6f411f33e0db578f04b333fb2110ddd.tar.gz bun-99d61877d6f411f33e0db578f04b333fb2110ddd.tar.zst bun-99d61877d6f411f33e0db578f04b333fb2110ddd.zip |
[solid] more progress, no fragments, but still not right
Diffstat (limited to 'integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js')
-rw-r--r-- | integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js b/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js new file mode 100644 index 000000000..36c3f649b --- /dev/null +++ b/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/output.bun.js @@ -0,0 +1,144 @@ +var _tmpl = template("<div</div>", 2), _tmpl$1 = template("<div/>", 0); +const template1 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, simple, null); + return _tmpl; +}; +const template2 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.dynamic, null); + return _tmpl; +}; +const template3 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, simple ? good : bad, null); + return _tmpl; +}; +const template4 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, simple ? good() : bad, null); + return _tmpl; +}; +const template5 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.dynamic ? good() : bad, null); + return _tmpl; +}; +const template6 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.dynamic && good(), null); + return _tmpl; +}; +const template7 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.count > 5 ? state.dynamic ? best : good() : bad, null); + return _tmpl; +}; +const template8 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.dynamic && state.something && good(), null); + return _tmpl; +}; +const template9 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.dynamic && good() || bad, null); + return _tmpl; +}; +const template10 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.a ? "a" : state.b ? "b" : state.c ? "c" : "fallback", null); + return _tmpl; +}; +const template11 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.a ? a() : state.b ? b() : state.c ? "c" : "fallback", null); + return _tmpl; +}; +const template12 = createComponent(Comp, { + render: state.dynamic ? good() : bad +}); +const template13 = createComponent(Comp, { + render: state.dynamic ? good : bad +}); +const template14 = createComponent(Comp, { + render: state.dynamic && good() +}); +const template15 = createComponent(Comp, { + render: state.dynamic && good +}); +const template16 = createComponent(Comp, { + render: state.dynamic || good() +}); +const template17 = createComponent(Comp, { + render: state.dynamic ? createComponent(Comp, {}) : createComponent(Comp, {}) +}); +const template18 = createComponent(Comp, { + get children: [ + state.dynamic ? createComponent(Comp, {}) : createComponent(Comp, {}) + ] +}); +const template19 = () => { + var _el = _tmpl$1.cloneNode(true); + effect(() => { + return setAttribute(_el, "innerHTML", state.dynamic ? createComponent(Comp, {}) : createComponent(Comp, {})); + }); + return _el; +}; +const template20 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.dynamic ? createComponent(Comp, {}) : createComponent(Comp, {}), null); + return _tmpl; +}; +const template21 = createComponent(Comp, { + render: state?.dynamic ? "a" : "b" +}); +const template22 = createComponent(Comp, { + get children: [ + state?.dynamic ? "a" : "b" + ] +}); +const template23 = () => { + var _el = _tmpl$1.cloneNode(true); + effect(() => { + return setAttribute(_el, "innerHTML", state?.dynamic ? "a" : "b"); + }); + return _el; +}; +const template24 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state?.dynamic ? "a" : "b", null); + return _tmpl; +}; +const template25 = createComponent(Comp, { + render: state.dynamic ?? createComponent(Comp, {}) +}); +const template26 = createComponent(Comp, { + get children: [ + state.dynamic ?? createComponent(Comp, {}) + ] +}); +const template27 = () => { + var _el = _tmpl$1.cloneNode(true); + effect(() => { + return setAttribute(_el, "innerHTML", state.dynamic ?? createComponent(Comp, {})); + }); + return _el; +}; +const template28 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, state.dynamic ?? createComponent(Comp, {}), null); + return _tmpl; +}; +const template29 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, (thing() && thing1()) ?? thing2() ?? thing3(), null); + return _tmpl; +}; +const template30 = () => { + var _tmpl = _tmpl.cloneNode(true); + insert(_tmpl, thing() || thing1() || thing2(), null); + return _tmpl; +}; +const template31 = createComponent(Comp, { + value: count() ? count() ? count() : count() : count() +}); |