@@ -29,9 +29,20 @@ import {Reference} from '../../imports';
29
29
import { NgModuleMeta , PipeMeta } from '../../metadata' ;
30
30
import { ClassDeclaration } from '../../reflection' ;
31
31
32
- import { FullSourceMapping , NgTemplateDiagnostic , TypeCheckableDirectiveMeta } from './api' ;
32
+ import {
33
+ FullSourceMapping ,
34
+ GetPotentialAngularMetaOptions ,
35
+ NgTemplateDiagnostic ,
36
+ TypeCheckableDirectiveMeta ,
37
+ } from './api' ;
33
38
import { GlobalCompletion } from './completion' ;
34
- import { PotentialDirective , PotentialImport , PotentialImportMode , PotentialPipe } from './scope' ;
39
+ import {
40
+ PotentialDirective ,
41
+ PotentialImport ,
42
+ PotentialImportMode ,
43
+ PotentialPipe ,
44
+ TsCompletionEntryInfo ,
45
+ } from './scope' ;
35
46
import {
36
47
ElementSymbol ,
37
48
SelectorlessComponentSymbol ,
@@ -153,6 +164,11 @@ export interface TemplateTypeChecker {
153
164
node : AST | TmplAstNode ,
154
165
) : GlobalCompletion | null ;
155
166
167
+ /**
168
+ * Get the `TcbLocation` for the global context, which is the location of the `this` variable.
169
+ */
170
+ getGlobalTsContext ( component : ts . ClassDeclaration ) : TcbLocation | null ;
171
+
156
172
/**
157
173
* For the given expression node, retrieve a `TcbLocation` that can be used to perform
158
174
* autocompletion at that point in the expression, if such a location exists.
@@ -176,7 +192,11 @@ export interface TemplateTypeChecker {
176
192
* Get basic metadata on the directives which are in scope or can be imported for the given
177
193
* component.
178
194
*/
179
- getPotentialTemplateDirectives ( component : ts . ClassDeclaration ) : PotentialDirective [ ] ;
195
+ getPotentialTemplateDirectives (
196
+ component : ts . ClassDeclaration ,
197
+ tsLs : ts . LanguageService ,
198
+ options : GetPotentialAngularMetaOptions ,
199
+ ) : PotentialDirective [ ] ;
180
200
181
201
/**
182
202
* Get basic metadata on the pipes which are in scope or can be imported for the given component.
@@ -188,7 +208,29 @@ export interface TemplateTypeChecker {
188
208
* declares them (if the tag is from a directive/component), or `null` if the tag originates from
189
209
* the DOM schema.
190
210
*/
191
- getPotentialElementTags ( component : ts . ClassDeclaration ) : Map < string , PotentialDirective | null > ;
211
+ getPotentialElementTags (
212
+ component : ts . ClassDeclaration ,
213
+ tsLs : ts . LanguageService ,
214
+ options : GetPotentialAngularMetaOptions ,
215
+ ) : Map < string , PotentialDirective | null > ;
216
+
217
+ /**
218
+ * Retrieve a `Map` of potential template element tags that includes in the current component's file
219
+ * scope, or in the component's NgModule scope.
220
+ *
221
+ * The different with the `getPotentialElementTags` is that the directives in the map do not need
222
+ * to update the import statement.
223
+ */
224
+ getElementsInFileScope ( component : ts . ClassDeclaration ) : Map < string , PotentialDirective | null > ;
225
+
226
+ /**
227
+ * Get the scope data for a directive.
228
+ */
229
+ getDirectiveScopeData (
230
+ component : ts . ClassDeclaration ,
231
+ isInScope : boolean ,
232
+ tsCompletionEntryInfo : TsCompletionEntryInfo | null ,
233
+ ) : PotentialDirective | null ;
192
234
193
235
/**
194
236
* In the context of an Angular trait, generate potential imports for a directive.
0 commit comments