MCPcopy Index your code
hub / github.com/solidjs/solid-start / ExportNamedDeclaration

Function ExportNamedDeclaration

packages/start/src/directives/plugin.ts:207–234  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

205 }
206 },
207 ExportNamedDeclaration(path) {
208 if (path.node.source || path.node.exportKind === "type") {
209 return;
210 }
211 for (const specifier of path.get("specifiers")) {
212 if (isPathValid(specifier, t.isExportSpecifier)) {
213 const binding = traceBinding(specifier, specifier.node.local.name);
214
215 if (binding) {
216 bindings.add(binding);
217 }
218 }
219 }
220 const declarations = path.get("declaration");
221
222 if (isPathValid(declarations, t.isVariableDeclaration)) {
223 for (const declaration of declarations.get("declarations")) {
224 // Check if left is identifier
225 const left = unwrapPath(declaration.get("id"), t.isIdentifier);
226 if (left) {
227 const binding = traceBinding(left, left.node.name);
228 if (binding) {
229 bindings.add(binding);
230 }
231 }
232 }
233 }
234 },
235 });
236
237 for (const binding of bindings) {

Callers

nothing calls this directly

Calls 3

isPathValidFunction · 0.90
unwrapPathFunction · 0.90
traceBindingFunction · 0.85

Tested by

no test coverage detected