MCPcopy Create free account
hub / github.com/arktypeio/arktype / declaredIds

Function declaredIds

ark/aot/scope.ts:971–976  ·  view source on GitHub ↗
(declaration: Node)

Source from the content-addressed store, hash-verified

969 : (node as IdentifierReference).name
970
971export const declaredIds = (declaration: Node): Node[] =>
972 declaration.type === "VariableDeclaration" ?
973 declaration.declarations.flatMap(declarator => idsOf(declarator.id))
974 : "id" in declaration && declaration.id?.type === "Identifier" ?
975 [declaration.id]
976 : []
977
978export const idsOf = (pattern: Node): Node[] => {
979 switch (pattern.type) {

Callers 3

namespaceKindOfMethod · 0.90
visitMethod · 0.85
visitExportMethod · 0.85

Calls 1

idsOfFunction · 0.70

Tested by

no test coverage detected