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

Function getLiteralString

book/tiny-ts-parser.ts:530–533  ·  view source on GitHub ↗
(node: p.TSESTree.Expression)

Source from the content-addressed store, hash-verified

528}
529
530function getLiteralString(node: p.TSESTree.Expression) {
531 if (node.type !== "Literal" || typeof node.value !== "string") error("", node);
532 return node.value;
533}
534
535function getTypeProp(member: p.TSESTree.TypeElement) {
536 if (member.type !== "TSPropertySignature" || member.key.type !== "Identifier" || !member.typeAnnotation) {

Callers 3

getTagAndPropsFunction · 0.70
convertTypeFunction · 0.70
convertStmtFunction · 0.70

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected