MCPcopy Create free account
hub / github.com/arktypeio/arktype / checkExternal

Function checkExternal

ark/aot/unplugin.ts:426–438  ·  view source on GitHub ↗
(
		isExternal: (specifier: string) => boolean,
		problemOf: (specifier: string) => string,
		warn: (message: string) => void,
		specifiers = externalizableSpecifiers
	)

Source from the content-addressed store, hash-verified

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 }

Callers 3

checkInputExternalFunction · 0.85
keepCompilerFunction · 0.85
unplugin.tsFile · 0.85

Calls 3

throwBuildErrorFunction · 0.90
findMethod · 0.80
warnFunction · 0.70

Tested by

no test coverage detected