( ctx: InternalTraversal, context: SiteContext, relativePath: array<PropertyKey>, data: unknown )
| 658 | |
| 659 | /** adds a node's error at a path from ctx's, as a site's is added */ |
| 660 | export const errorFromNodeAt = ( |
| 661 | ctx: InternalTraversal, |
| 662 | context: SiteContext, |
| 663 | relativePath: array<PropertyKey>, |
| 664 | data: unknown |
| 665 | ): ArkError => |
| 666 | ctx.addError( |
| 667 | errorOfNodeContext( |
| 668 | context as never, |
| 669 | relativePath.length > 1 ? |
| 670 | [...ctx.path, ...relativePath] |
| 671 | : pathAt(ctx.path, relativePath[0]), |
| 672 | data, |
| 673 | ctx.config |
| 674 | ) |
| 675 | ) |
| 676 | |
| 677 | /** adds a union's error from each branch's first */ |
| 678 | export const errorFromUnion = ( |
no test coverage detected