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

Function getAssertionsInFile

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

Source from the content-addressed store, hash-verified

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

Callers 1

analyzeProjectAssertionsFunction · 0.85

Calls 3

getCallExpressionsByNameFunction · 0.90
analyzeAssertCallFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected