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

Function isPathValid

packages/start/src/directives/paths.ts:5–11  ·  view source on GitHub ↗
(
  path: unknown,
  key: TypeFilter<V>,
)

Source from the content-addressed store, hash-verified

3type TypeFilter<V extends t.Node> = (node: t.Node) => node is V;
4
5export function isPathValid<V extends t.Node>(
6 path: unknown,
7 key: TypeFilter<V>,
8): path is babel.NodePath<V> {
9 const node = (path as babel.NodePath).node;
10 return node ? key(node) : false;
11}
12
13export type NestedExpression =
14 | t.ParenthesizedExpression

Callers 8

cleanFunctionDirectivesFunction · 0.90
isFunctionDirectiveValidFunction · 0.90
traceBindingFunction · 0.90
ExportNamedDeclarationFunction · 0.90
BindingIdentifierFunction · 0.90
unwrapPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected