Skip to content

Commit 302b0ec

Browse files
authored
chore: remove unused selector() function (#10903)
1 parent 7e5e462 commit 302b0ec

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

packages/svelte/src/compiler/phases/2-analyze/index.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -952,25 +952,6 @@ const runes_scope_tweaker = {
952952
function is_known_safe_call(node, context) {
953953
const callee = node.callee;
954954

955-
// Check for selector() API calls
956-
if (callee.type === 'MemberExpression' && callee.object.type === 'Identifier') {
957-
const binding = context.state.scope.get(callee.object.name);
958-
const selector_binding = context.state.scope.get('selector');
959-
if (
960-
selector_binding !== null &&
961-
selector_binding.declaration_kind === 'import' &&
962-
selector_binding.initial !== null &&
963-
selector_binding.initial.type === 'ImportDeclaration' &&
964-
selector_binding.initial.source.value === 'svelte' &&
965-
binding !== null &&
966-
binding.initial !== null &&
967-
binding.initial.type === 'CallExpression' &&
968-
binding.initial.callee.type === 'Identifier' &&
969-
binding.initial.callee.name === 'selector'
970-
) {
971-
return true;
972-
}
973-
}
974955
// String / Number / BigInt / Boolean casting calls
975956
if (callee.type === 'Identifier') {
976957
const name = callee.name;

packages/svelte/src/internal/server/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -640,12 +640,6 @@ export function create_anchor(payload) {
640640
return `<!ssr:${depth}>`;
641641
}
642642

643-
/** @returns {[() => false, (value: boolean) => void]} */
644-
export function selector() {
645-
// Add SSR stubs
646-
return [() => false, noop];
647-
}
648-
649643
/**
650644
* @param {number} timeout
651645
* @returns {() => void}

0 commit comments

Comments
 (0)