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

Function isFunctionDirectiveValid

packages/start/src/directives/plugin.ts:66–77  ·  view source on GitHub ↗
(
  ctx: StateContext,
  path: babel.NodePath<t.FunctionDeclaration | ValidFunction>,
)

Source from the content-addressed store, hash-verified

64}
65
66function isFunctionDirectiveValid(
67 ctx: StateContext,
68 path: babel.NodePath<t.FunctionDeclaration | ValidFunction>,
69) {
70 const body = path.get("body");
71
72 if (isPathValid(body, t.isBlockStatement)) {
73 return isDirectiveValid(ctx, body.node.directives);
74 }
75
76 return false;
77}
78
79function createID(ctx: StateContext, name: string) {
80 const base = `${ctx.hash}-${ctx.count++}`;

Callers 1

transformFunctionFunction · 0.85

Calls 2

isPathValidFunction · 0.90
isDirectiveValidFunction · 0.85

Tested by

no test coverage detected