( config: ArkSchemaConfig | undefined )
| 174 | * JavaScript still passes, and which would otherwise be kept and never read |
| 175 | */ |
| 176 | export const assertNoProblemConfig = ( |
| 177 | config: ArkSchemaConfig | undefined |
| 178 | ): void => { |
| 179 | for (const k in config) { |
| 180 | const ofCode: unknown = config[k as never] |
| 181 | if ( |
| 182 | (isNodeKind(k) || k === "undeclared" || k === "discriminant") && |
| 183 | hasDomain(ofCode, "object") && |
| 184 | "problem" in ofCode |
| 185 | ) |
| 186 | throwParseError(removedProblemMessage) |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | const maxFirstTypeLength = 80 |
| 191 |
no test coverage detected