( isExternal: (specifier: string) => boolean, problemOf: (specifier: string) => string, warn: (message: string) => void, specifiers = externalizableSpecifiers )
| 424 | } |
| 425 | // an external arktype loads apart from the runtime its validators use |
| 426 | const checkExternal = ( |
| 427 | isExternal: (specifier: string) => boolean, |
| 428 | problemOf: (specifier: string) => string, |
| 429 | warn: (message: string) => void, |
| 430 | specifiers = externalizableSpecifiers |
| 431 | ) => { |
| 432 | if (!isStandalone || opts?.shadow) return |
| 433 | const specifier = specifiers.find(isExternal) |
| 434 | if (!specifier) return |
| 435 | const problem = problemOf(specifier) |
| 436 | if (opts?.allowUnsafe) warn(problem) |
| 437 | else throwBuildError(withAllowUnsafe(problem)) |
| 438 | } |
| 439 | const checkInputExternal = function ( |
| 440 | this: { warn: (message: string) => void }, |
| 441 | options: { external?: unknown } |
no test coverage detected