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

Function error

book/tiny-ts-parser.ts:1291–1298  ·  view source on GitHub ↗
(msg: string, node: any)

Source from the content-addressed store, hash-verified

1289
1290// deno-lint-ignore no-explicit-any
1291export function error(msg: string, node: any): never {
1292 if (node.loc) {
1293 const { start, end } = node.loc;
1294 throw new Error(`test.ts:${start.line}:${start.column + 1}-${end.line}:${end.column + 1} ${msg}`);
1295 } else {
1296 throw new Error(msg);
1297 }
1298}
1299
1300// Returns a string that represents a given type
1301export function typeShow(ty: Type): string {

Callers 15

expandTypeAliasesFunction · 0.70
getIdentifierFunction · 0.70
getLiteralStringFunction · 0.70
getTypePropFunction · 0.70
getPropFunction · 0.70
getTagAndPropsFunction · 0.70
getSwitchVarNameFunction · 0.70
getParamFunction · 0.70
getRecFuncFunction · 0.70
convertTypeFunction · 0.70
convertExprFunction · 0.70
convertStmtFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected