MCPcopy
hub / github.com/arktypeio/arktype / getAssertionsInFile

Function getAssertionsInFile

ark/attest/cache/writeAssertionCache.ts:52–59  ·  view source on GitHub ↗
(
	file: ts.SourceFile,
	diagnosticsByFile: DiagnosticsByFile,
	attestAliases: string[]
)

Source from the content-addressed store, hash-verified

50}
51
52export const getAssertionsInFile = (
53 file: ts.SourceFile,
54 diagnosticsByFile: DiagnosticsByFile,
55 attestAliases: string[]
56): TypeAssertionData[] => {
57 const assertCalls = getCallExpressionsByName(file, attestAliases)
58 return assertCalls.map(call => analyzeAssertCall(call, diagnosticsByFile))
59}
60
61export const analyzeAssertCall = (
62 assertCall: ts.CallExpression,

Callers 1

analyzeProjectAssertionsFunction · 0.85

Calls 3

getCallExpressionsByNameFunction · 0.90
analyzeAssertCallFunction · 0.85
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…