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

Function getParam

article/utils.ts:221–227  ·  view source on GitHub ↗
(node: p.TSESTree.Parameter)

Source from the content-addressed store, hash-verified

219}
220
221function getParam(node: p.TSESTree.Parameter): Param {
222 if (node.type !== "Identifier") error("parameter must be a variable", node);
223 if (!node.typeAnnotation) error("parameter type is required", node);
224 const name = node.name;
225 const type = convertType(node.typeAnnotation.typeAnnotation);
226 return { name, type };
227}
228
229function getRecFunc(node: p.TSESTree.FunctionDeclaration, ctx: Context, restFunc: (() => Term) | null): Term {
230 if (!node.id) error("function name is required", node);

Callers 3

getRecFuncFunction · 0.70
convertTypeFunction · 0.70
convertExprFunction · 0.70

Calls 2

errorFunction · 0.70
convertTypeFunction · 0.70

Tested by

no test coverage detected