MCPcopy Create free account
hub / github.com/LambdaNote/support-ts-tapl / getIdentifier

Function getIdentifier

article/utils.ts:178–181  ·  view source on GitHub ↗
(node: p.TSESTree.Expression | p.TSESTree.PrivateIdentifier | p.TSESTree.TSQualifiedName)

Source from the content-addressed store, hash-verified

176}
177
178function getIdentifier(node: p.TSESTree.Expression | p.TSESTree.PrivateIdentifier | p.TSESTree.TSQualifiedName) {
179 if (node.type !== "Identifier") error("identifier expected", node);
180 return node.name;
181}
182
183function getLiteralString(node: p.TSESTree.Expression) {
184 if (node.type !== "Literal" || typeof node.value !== "string") error("", node);

Callers 4

getPropFunction · 0.70
getSwitchVarNameFunction · 0.70
convertTypeFunction · 0.70
convertStmtFunction · 0.70

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected