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

Function getLiteralString

article/utils.ts:183–186  ·  view source on GitHub ↗
(node: p.TSESTree.Expression)

Source from the content-addressed store, hash-verified

181}
182
183function getLiteralString(node: p.TSESTree.Expression) {
184 if (node.type !== "Literal" || typeof node.value !== "string") error("", node);
185 return node.value;
186}
187
188function getTypeProp(member: p.TSESTree.TypeElement) {
189 if (member.type !== "TSPropertySignature" || member.key.type !== "Identifier" || !member.typeAnnotation) {

Callers 3

getTagAndValFunction · 0.70
convertTypeFunction · 0.70
convertStmtFunction · 0.70

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected