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

Function langOf

ark/aot/module.ts:201–205  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

199type Lang = "js" | "jsx" | "ts" | "tsx"
200
201export const langOf = (id: string): Lang =>
202 /\.[cm]?tsx$/.test(id) ? "tsx"
203 : /\.[cm]?ts$/.test(id) ? "ts"
204 : /\.jsx$/.test(id) ? "jsx"
205 : "js"
206
207const islandMarker = "@ark-runtime"
208

Callers 2

importsOfFunction · 0.90
parseModuleFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected