(path: string, source: string, offset: number)
| 604 | |
| 605 | // e.g. src/main.ts:3:1 |
| 606 | const 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 |
| 612 | const literalIn = (text: string): string | undefined => |
no outgoing calls
no test coverage detected