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

Function positionIn

ark/aot/scan.ts:606–609  ·  view source on GitHub ↗
(path: string, source: string, offset: number)

Source from the content-addressed store, hash-verified

604
605// e.g. src/main.ts:3:1
606const positionIn = (path: string, source: string, offset: number) => {
607 const before = source.slice(0, offset)
608 return `${path}:${before.split("\n").length}:${offset - before.lastIndexOf("\n")}`
609}
610
611// a `$` not opening an expression, as in TanStack Router's `$.tsx`, is part of the name
612const literalIn = (text: string): string | undefined =>

Callers 2

unreadAtFunction · 0.85
programAsBuiltFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected