(ast: AST.AST, annotation: string | undefined, key: symbol)
| 424 | } |
| 425 | |
| 426 | function filterBuiltIn(ast: AST.AST, annotation: string | undefined, key: symbol): string | undefined { |
| 427 | if (annotation !== undefined) { |
| 428 | switch (ast._tag) { |
| 429 | case "StringKeyword": |
| 430 | return annotation !== AST.stringKeyword.annotations[key] ? annotation : undefined |
| 431 | case "NumberKeyword": |
| 432 | return annotation !== AST.numberKeyword.annotations[key] ? annotation : undefined |
| 433 | case "BooleanKeyword": |
| 434 | return annotation !== AST.booleanKeyword.annotations[key] ? annotation : undefined |
| 435 | } |
| 436 | } |
| 437 | return annotation |
| 438 | } |
| 439 | |
| 440 | function isJsonValue(value: unknown, visited: Set<unknown> = new Set()): value is JsonValue { |
| 441 | if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") { |
no outgoing calls
no test coverage detected
searching dependent graphs…