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

Function serializeArg

ark/attest/cache/writeAssertionCache.ts:169–178  ·  view source on GitHub ↗
(
	arg: StringifiableType,
	context: ArgumentTypes
)

Source from the content-addressed store, hash-verified

167}
168
169const serializeArg = (
170 arg: StringifiableType,
171 context: ArgumentTypes
172): ArgAssertionData => ({
173 type: arg.toString(),
174 relationships: {
175 args: context.args.map(other => compareTsTypes(arg, other)),
176 typeArgs: context.typeArgs.map(other => compareTsTypes(arg, other))
177 }
178})
179
180const getCompletions = (attestCall: ts.CallExpression) => {
181 const arg = attestCall.arguments[0]

Callers 1

analyzeAssertCallFunction · 0.70

Calls 3

compareTsTypesFunction · 0.85
toStringMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected