( file: ts.SourceFile, position: SourcePosition )
| 125 | : undefined |
| 126 | |
| 127 | export const getAbsolutePosition = ( |
| 128 | file: ts.SourceFile, |
| 129 | position: SourcePosition |
| 130 | ): number => { |
| 131 | const pos = ts.getPositionOfLineAndCharacter( |
| 132 | file, |
| 133 | // TS uses 0-based line and char #s |
| 134 | position.line - 1, |
| 135 | position.char - 1 |
| 136 | ) |
| 137 | if (!pos) { |
| 138 | throwInternalError( |
| 139 | `Absolute position ${printable(position)} does not exist in ${file.fileName}` |
| 140 | ) |
| 141 | } |
| 142 | return pos |
| 143 | } |
| 144 | |
| 145 | export type TsconfigInfo = { |
| 146 | path: string | undefined |
no test coverage detected