[REF] simplify template definition

This commit is contained in:
Géry Debongnie
2022-05-26 15:09:09 +02:00
committed by Sam Degueldre
parent 98b58b505b
commit 2b4d8874c7
52 changed files with 1519 additions and 1535 deletions
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`t-ref can get a dynamic ref on a node 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -17,7 +17,7 @@ exports[`t-ref can get a dynamic ref on a node 1`] = `
`;
exports[`t-ref can get a ref on a node 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -32,11 +32,10 @@ exports[`t-ref can get a ref on a node 1`] = `
`;
exports[`t-ref ref in a t-call 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
let { getTemplate } = helpers;
const callTemplate_1 = getTemplate(\`sub\`);
const callTemplate_1 = app.getTemplate(\`sub\`);
let block1 = createBlock(\`<div><block-child-0/></div>\`);
@@ -48,7 +47,7 @@ exports[`t-ref ref in a t-call 1`] = `
`;
exports[`t-ref ref in a t-call 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -63,7 +62,7 @@ exports[`t-ref ref in a t-call 2`] = `
`;
exports[`t-ref ref in a t-if 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -83,7 +82,7 @@ exports[`t-ref ref in a t-if 1`] = `
`;
exports[`t-ref refs in a loop 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
let { prepareList, withKey } = helpers;
@@ -111,7 +110,7 @@ exports[`t-ref refs in a loop 1`] = `
`;
exports[`t-ref two refs, one in a t-if 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;