MCPcopy Create free account
hub / github.com/Effect-TS/effect / isNode

Function isNode

packages/tools/doctest/src/Transform.ts:41–45  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

39}
40
41const isNode = (value: unknown): value is Node =>
42 typeof value === "object" && value !== null &&
43 "type" in value && typeof value.type === "string" &&
44 "start" in value && typeof value.start === "number" &&
45 "end" in value && typeof value.end === "number"
46
47const isStatement = (node: Node): boolean => node.type.endsWith("Statement") || statementTypes.has(node.type)
48

Callers 2

visitFunction · 0.85
transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected