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

Function installedNativeChecker

ark/aot/declareNative.ts:90–100  ·  view source on GitHub ↗
(
	cwd: string
)

Source from the content-addressed store, hash-verified

88
89// the native checker installed, tsrs where its binary is
90export const installedNativeChecker = (
91 cwd: string
92): NativeChecker | undefined => {
93 for (const require of requiresFor(cwd)) {
94 if (hasTsrsBinary(require)) return "tsrs"
95 for (const entry of entriesByChecker.tsgo) {
96 const version = nativeVersionOf(require, entry)
97 if (version && isNativeVersion(version)) return "tsgo"
98 }
99 }
100}
101
102const loadNative = (cwd: string, checker: NativeChecker): Native => {
103 for (const require of requiresFor(cwd)) {

Callers 1

defaultCheckerOfFunction · 0.90

Calls 4

requiresForFunction · 0.85
nativeVersionOfFunction · 0.85
isNativeVersionFunction · 0.85
hasTsrsBinaryFunction · 0.70

Tested by

no test coverage detected