(path: T)
| 22 | * Remove a .ts, .d.ts, .tsx, or .js extension from a file name. |
| 23 | */ |
| 24 | export function stripExtension<T extends PathString>(path: T): T { |
| 25 | return path.replace(TS_DTS_TSX_JS_EXTENSION, '') as T; |
| 26 | } |
| 27 | |
| 28 | export function getSourceFileOrError(program: ts.Program, fileName: AbsoluteFsPath): ts.SourceFile { |
| 29 | const sf = program.getSourceFile(fileName); |
no test coverage detected
searching dependent graphs…