remove unused arg

pull/15538/head
Rich Harris 4 months ago
parent 98fa3c0c7a
commit f36df5f5b1

@ -47,12 +47,11 @@ function build_locations(locations) {
/** /**
* @param {ComponentClientTransformState} state * @param {ComponentClientTransformState} state
* @param {ComponentContext} context
* @param {Namespace} namespace * @param {Namespace} namespace
* @param {Identifier} template_name * @param {Identifier} template_name
* @param {number} [flags] * @param {number} [flags]
*/ */
export function transform_template(state, context, namespace, template_name, flags) { export function transform_template(state, namespace, template_name, flags) {
const expression = const expression =
state.options.templatingMode === 'functional' state.options.templatingMode === 'functional'
? template_to_functions(state.template.nodes) ? template_to_functions(state.template.nodes)
@ -68,10 +67,10 @@ export function transform_template(state, context, namespace, template_name, fla
call = b.call( call = b.call(
'$.add_locations', '$.add_locations',
call, call,
b.member(b.id(context.state.analysis.name), '$.FILENAME', true), b.member(b.id(state.analysis.name), '$.FILENAME', true),
build_locations(state.locations) build_locations(state.locations)
); );
} }
context.state.hoisted.push(b.var(template_name, call)); state.hoisted.push(b.var(template_name, call));
} }

@ -96,7 +96,7 @@ export function Fragment(node, context) {
let flags = state.template.needs_import_node ? TEMPLATE_USE_IMPORT_NODE : undefined; let flags = state.template.needs_import_node ? TEMPLATE_USE_IMPORT_NODE : undefined;
transform_template(state, context, namespace, template_name, flags); transform_template(state, namespace, template_name, flags);
body.push(b.var(id, b.call(template_name))); body.push(b.var(id, b.call(template_name)));
close = b.stmt(b.call('$.append', b.id('$$anchor'), id)); close = b.stmt(b.call('$.append', b.id('$$anchor'), id));
@ -144,7 +144,7 @@ export function Fragment(node, context) {
// special case — we can use `$.comment` instead of creating a unique template // special case — we can use `$.comment` instead of creating a unique template
body.push(b.var(id, b.call('$.comment'))); body.push(b.var(id, b.call('$.comment')));
} else { } else {
transform_template(state, context, namespace, template_name, flags); transform_template(state, namespace, template_name, flags);
body.push(b.var(id, b.call(template_name))); body.push(b.var(id, b.call(template_name)));
} }

Loading…
Cancel
Save