( fileName: string, position: number, compiler: NgCompiler, )
| 175 | * Retrieves the `ts.ClassDeclaration` at a location along with its template AST nodes. |
| 176 | */ |
| 177 | export function getTypeCheckInfoAtPosition( |
| 178 | fileName: string, |
| 179 | position: number, |
| 180 | compiler: NgCompiler, |
| 181 | ): TypeCheckInfo | undefined { |
| 182 | if (isTypeScriptFile(fileName)) { |
| 183 | const sf = compiler.getCurrentProgram().getSourceFile(fileName); |
| 184 | if (sf === undefined) { |
| 185 | return undefined; |
| 186 | } |
| 187 | |
| 188 | return getInlineTypeCheckInfoAtPosition(sf, position, compiler); |
| 189 | } else { |
| 190 | return getFirstComponentForTemplateFile(fileName, compiler); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * First, attempt to sort component declarations by file name. |
no test coverage detected
searching dependent graphs…