(workPath: string)
| 136 | } |
| 137 | |
| 138 | function resolveTypeScriptModule(workPath: string): TypeScriptModule | null { |
| 139 | try { |
| 140 | const id = require_.resolve('typescript', { paths: [workPath] }); |
| 141 | return require_(id) as TypeScriptModule; |
| 142 | } catch (_e) { |
| 143 | return null; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | export const findNearestTsconfig = async ( |
| 148 | workPath: string |