Function
mkRoute
(
filePath: string,
line: number,
method: string,
path: string,
nameOverride?: string
)
Source from the content-addressed store, hash-verified
| 726 | } |
| 727 | |
| 728 | function mkRoute( |
| 729 | filePath: string, |
| 730 | line: number, |
| 731 | method: string, |
| 732 | path: string, |
| 733 | nameOverride?: string |
| 734 | ): Node { |
| 735 | return { |
| 736 | id: `route:${filePath}:${line}:${method}:${path}`, |
| 737 | kind: 'route', |
| 738 | name: nameOverride ?? `${method} ${path}`, |
| 739 | qualifiedName: `${filePath}::${method}:${path}`, |
| 740 | filePath, |
| 741 | language: 'typescript', |
| 742 | startLine: line, |
| 743 | endLine: line, |
| 744 | startColumn: 0, |
| 745 | endColumn: 0, |
| 746 | updatedAt: 0, |
| 747 | }; |
| 748 | } |
| 749 | |
| 750 | function makeContext(opts: { |
| 751 | files?: Record<string, string>; |
Tested by
no test coverage detected