chore: remove unused selector() function (#10903)

pull/10912/head
Rich Harris 7 months ago committed by GitHub
parent 7e5e462194
commit 302b0ec973
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -952,25 +952,6 @@ const runes_scope_tweaker = {
function is_known_safe_call(node, context) {
const callee = node.callee;
// Check for selector() API calls
if (callee.type === 'MemberExpression' && callee.object.type === 'Identifier') {
const binding = context.state.scope.get(callee.object.name);
const selector_binding = context.state.scope.get('selector');
if (
selector_binding !== null &&
selector_binding.declaration_kind === 'import' &&
selector_binding.initial !== null &&
selector_binding.initial.type === 'ImportDeclaration' &&
selector_binding.initial.source.value === 'svelte' &&
binding !== null &&
binding.initial !== null &&
binding.initial.type === 'CallExpression' &&
binding.initial.callee.type === 'Identifier' &&
binding.initial.callee.name === 'selector'
) {
return true;
}
}
// String / Number / BigInt / Boolean casting calls
if (callee.type === 'Identifier') {
const name = callee.name;

@ -640,12 +640,6 @@ export function create_anchor(payload) {
return `<!ssr:${depth}>`;
}
/** @returns {[() => false, (value: boolean) => void]} */
export function selector() {
// Add SSR stubs
return [() => false, noop];
}
/**
* @param {number} timeout
* @returns {() => void}

Loading…
Cancel
Save