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

Method overwriteProblem

ark/aot/interpreter.ts:894–914  ·  view source on GitHub ↗
(
		result: Record<PropertyKey, unknown>,
		key: PropertyKey,
		node: Node,
		ctx: Context
	)

Source from the content-addressed store, hash-verified

892
893 // a site dropping an unknown value would drop its computation too
894 private overwriteProblem(
895 result: Record<PropertyKey, unknown>,
896 key: PropertyKey,
897 node: Node,
898 ctx: Context
899 ): DynamicValue | undefined {
900 if (!ctx.site) return
901 const dynamic = findDynamic(
902 result[key],
903 dynamic => !this.declaredDynamics.has(dynamic)
904 )
905 return (
906 dynamic &&
907 this.reject(
908 node,
909 ctx,
910 "overwrites a value the build does not know",
911 dynamic.asOperand()
912 )
913 )
914 }
915
916 private evaluateUnary(
917 node: Extract<Node, { type: "UnaryExpression" }>,

Callers 1

evaluateObjectMethod · 0.95

Calls 4

rejectMethod · 0.95
findDynamicFunction · 0.85
asOperandMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected