From 99d61877d6f411f33e0db578f04b333fb2110ddd Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Fri, 20 May 2022 00:45:51 -0700 Subject: [solid] more progress, no fragments, but still not right --- .../conditionalExpressions/code.js | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js (limited to 'integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js') diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js b/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js new file mode 100644 index 000000000..80f1a6a4f --- /dev/null +++ b/integration/bunjs-only-snippets/solid-dom-fixtures/conditionalExpressions/code.js @@ -0,0 +1,71 @@ +const template1 =
{simple}
; + +const template2 =
{state.dynamic}
; + +const template3 =
{simple ? good : bad}
; + +const template4 =
{simple ? good() : bad}
; + +const template5 =
{state.dynamic ? good() : bad}
; + +const template6 =
{state.dynamic && good()}
; + +const template7 = ( +
{state.count > 5 ? (state.dynamic ? best : good()) : bad}
+); + +const template8 =
{state.dynamic && state.something && good()}
; + +const template9 =
{(state.dynamic && good()) || bad}
; + +const template10 = ( +
{state.a ? "a" : state.b ? "b" : state.c ? "c" : "fallback"}
+); + +const template11 = ( +
{state.a ? a() : state.b ? b() : state.c ? "c" : "fallback"}
+); + +const template12 = ; + +// no dynamic predicate +const template13 = ; + +const template14 = ; + +// no dynamic predicate +const template15 = ; + +const template16 = ; + +const template17 = : } />; + +const template18 = {state.dynamic ? : }; + +const template19 =
: } />; + +const template20 =
{state.dynamic ? : }
; + +const template21 = ; + +const template22 = {state?.dynamic ? "a" : "b"}; + +const template23 =
; + +const template24 =
{state?.dynamic ? "a" : "b"}
; + +const template25 = } />; + +const template26 = {state.dynamic ?? }; + +const template27 =
} />; + +const template28 =
{state.dynamic ?? }
; + +const template29 =
{(thing() && thing1()) ?? thing2() ?? thing3()}
; + +const template30 =
{thing() || thing1() || thing2()}
; + +const template31 = ( + +); -- cgit v1.2.3