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

Function ImportDeclaration

packages/vite/hmr/server/websocket.ts:2993–2998  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

2991 const imports: Array<{ src: string; wantsDefault: boolean }> = [];
2992 babelTraverse(ast, {
2993 ImportDeclaration(p) {
2994 const src = p.node.source.value;
2995 if (typeof src !== 'string') return;
2996 const wantsDefault = p.node.specifiers.some((s: any) => s.type === 'ImportDefaultSpecifier');
2997 imports.push({ src, wantsDefault });
2998 },
2999 });
3000 // Resolve and verify each static import that asks for default
3001 for (const imp of imports) {

Callers

nothing calls this directly

Calls 9

someMethod · 0.80
forEachMethod · 0.80
joinMethod · 0.80
replaceMethod · 0.80
addMethod · 0.65
pushMethod · 0.45
testMethod · 0.45
removeMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected