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

Function reportUnsafe

ark/aot/unplugin.ts:699–709  ·  view source on GitHub ↗
(
		problem: string | undefined,
		diagnostics: RenderedDiagnostics,
		{ offersAllowUnsafe = true }: { offersAllowUnsafe?: boolean } = {}
	)

Source from the content-addressed store, hash-verified

697 : diagnostics
698 // what may throw at runtime fails unless allowUnsafe is set
699 const reportUnsafe = (
700 problem: string | undefined,
701 diagnostics: RenderedDiagnostics,
702 { offersAllowUnsafe = true }: { offersAllowUnsafe?: boolean } = {}
703 ) => {
704 if (!problem) return
705 if (opts?.allowUnsafe) return void diagnostics.warnings.push(problem)
706 diagnostics.errors.push(
707 offersAllowUnsafe ? withAllowUnsafe(problem) : problem
708 )
709 }
710 const reportedPrecompiled = new Set<string>()
711 // a package this plugin precompiles imports the runtime as it transforms
712 // it, inline

Callers 2

resolveEsbuildRuntimeFunction · 0.70
handlerFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected