1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import { AST, TmplAstNode } from '@angular/compiler';
|
10 | import { NgCompiler } from '@angular/compiler-cli/src/ngtsc/core';
|
11 | import { TypeCheckingProgramStrategy } from '@angular/compiler-cli/src/ngtsc/typecheck/api';
|
12 | import * as ts from 'typescript';
|
13 | declare enum RequestKind {
|
14 | Template = 0,
|
15 | TypeScript = 1
|
16 | }
|
17 | interface TemplateRequest {
|
18 | kind: RequestKind.Template;
|
19 | requestNode: TmplAstNode | AST;
|
20 | position: number;
|
21 | }
|
22 | interface TypeScriptRequest {
|
23 | kind: RequestKind.TypeScript;
|
24 | requestNode: ts.Node;
|
25 | }
|
26 | declare type RequestOrigin = TemplateRequest | TypeScriptRequest;
|
27 | export declare class ReferencesAndRenameBuilder {
|
28 | private readonly strategy;
|
29 | private readonly tsLS;
|
30 | private readonly compiler;
|
31 | private readonly ttc;
|
32 | constructor(strategy: TypeCheckingProgramStrategy, tsLS: ts.LanguageService, compiler: NgCompiler);
|
33 | getRenameInfo(filePath: string, position: number): Omit<ts.RenameInfoSuccess, 'kind' | 'kindModifiers'> | ts.RenameInfoFailure;
|
34 | findRenameLocations(filePath: string, position: number): readonly ts.RenameLocation[] | undefined;
|
35 | private findRenameLocationsAtTemplatePosition;
|
36 | private getTsNodeAtPosition;
|
37 | findRenameLocationsAtTypescriptPosition(filePath: string, position: number, requestOrigin: RequestOrigin): readonly ts.RenameLocation[] | undefined;
|
38 | getReferencesAtPosition(filePath: string, position: number): ts.ReferenceEntry[] | undefined;
|
39 | private getReferencesAtTemplatePosition;
|
40 | private getTargetDetailsAtTemplatePosition;
|
41 | private getPositionsForDirectives;
|
42 | private getReferencesAtTypescriptPosition;
|
43 | private convertToTemplateDocumentSpan;
|
44 | }
|
45 | export {};
|