(ast: AST.AST, examples: ReadonlyArray<unknown>)
| 418 | } |
| 419 | |
| 420 | function encodeExamples(ast: AST.AST, examples: ReadonlyArray<unknown>): Array<JsonValue> | undefined { |
| 421 | const getOption = ParseResult.getOption(ast, false) |
| 422 | const out = Arr.filterMap(examples, (e) => getOption(e).pipe(Option.filter(isJsonValue))) |
| 423 | return out.length > 0 ? out : undefined |
| 424 | } |
| 425 | |
| 426 | function filterBuiltIn(ast: AST.AST, annotation: string | undefined, key: symbol): string | undefined { |
| 427 | if (annotation !== undefined) { |
no test coverage detected
searching dependent graphs…