( pair: Pair, // e.g. a validation's, printing its input only where they differ observation: string | (() => string), arktype: unknown, precompiled: unknown, reason?: string, counterparts = new Map<object, unknown>() )
| 954 | : issues |
| 955 | |
| 956 | const compare = ( |
| 957 | pair: Pair, |
| 958 | // e.g. a validation's, printing its input only where they differ |
| 959 | observation: string | (() => string), |
| 960 | arktype: unknown, |
| 961 | precompiled: unknown, |
| 962 | reason?: string, |
| 963 | counterparts = new Map<object, unknown>() |
| 964 | ): void => { |
| 965 | if (!isAlike(arktype, precompiled, { counterparts, originals: new Map() })) { |
| 966 | fail( |
| 967 | pair, |
| 968 | typeof observation === "string" ? observation : observation(), |
| 969 | printable(arktype), |
| 970 | printable(precompiled), |
| 971 | reason |
| 972 | ) |
| 973 | } |
| 974 | } |
| 975 | |
| 976 | const fail = ( |
| 977 | pair: Pair, |
no test coverage detected