MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / Identifier

Function Identifier

packages/vite/hmr/helpers/ast-normalizer.ts:325–336  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

323 if (path.node.id?.name) declared.add(path.node.id.name);
324 },
325 Identifier(path) {
326 const name = path.node.name;
327 if (!name || !name.startsWith('_')) return;
328 if (/^__ns_(?:rt|core)_ns(?:\d+|_re)$/.test(name)) return;
329 if (path.scope.hasBinding(name)) return;
330 if (t.isObjectProperty(path.parent) && path.parent.key === path.node && !path.parent.computed) return;
331 if (t.isMemberExpression(path.parent) && path.parent.property === path.node && !path.parent.computed) return;
332 if (/^(ctx|cache)$/.test(name)) return;
333 if (/^(sfc_main|ns_sfc__|sfc)/.test(name)) return;
334 if (/^(hoisted_|component_|directive_)/.test(name)) return;
335 underscoreUses.add(name);
336 },
337 });
338
339 // Detect free uses of $navigateTo/$navigateBack (not declared at top-level)

Callers

nothing calls this directly

Calls 2

addMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected