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

Function parse

ark/aot/module.ts:135–140  ·  view source on GitHub ↗
(id: string, source: string, lang: Lang)

Source from the content-addressed store, hash-verified

133}
134
135const parse = (id: string, source: string, lang: Lang) =>
136 parseCode(id, source, {
137 lang,
138 sourceType: /\.c[jt]s$/.test(id) ? "commonjs" : "module",
139 preserveParens: false
140 })
141
142// a module's tree, read in the language its id names
143export const parseModule = (id: string, source: string): ParseResult => {

Callers 5

untilUnchangedFunction · 0.70
parseModuleFunction · 0.70
passedReaderOfFunction · 0.70
fromJsonSchemaFunction · 0.50
fs.tsFile · 0.50

Calls 2

parseCodeFunction · 0.85
testMethod · 0.80

Tested by

no test coverage detected