1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import { AST, TmplAstNode, TmplAstTemplate } from '@angular/compiler';
|
10 | import { NgCompiler } from '@angular/compiler-cli/src/ngtsc/core';
|
11 | import * as ts from 'typescript';
|
12 | export declare enum CompletionNodeContext {
|
13 | None = 0,
|
14 | ElementTag = 1,
|
15 | ElementAttributeKey = 2,
|
16 | ElementAttributeValue = 3,
|
17 | EventValue = 4,
|
18 | TwoWayBinding = 5
|
19 | }
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare class CompletionBuilder<N extends TmplAstNode | AST> {
|
32 | private readonly tsLS;
|
33 | private readonly compiler;
|
34 | private readonly component;
|
35 | private readonly node;
|
36 | private readonly nodeContext;
|
37 | private readonly nodeParent;
|
38 | private readonly template;
|
39 | private readonly typeChecker;
|
40 | private readonly templateTypeChecker;
|
41 | constructor(tsLS: ts.LanguageService, compiler: NgCompiler, component: ts.ClassDeclaration, node: N, nodeContext: CompletionNodeContext, nodeParent: TmplAstNode | AST | null, template: TmplAstTemplate | null);
|
42 | /**
|
43 | * Analogue for `ts.LanguageService.getCompletionsAtPosition`.
|
44 | */
|
45 | getCompletionsAtPosition(options: ts.GetCompletionsAtPositionOptions | undefined): ts.WithMetadata<ts.CompletionInfo> | undefined;
|
46 | /**
|
47 | * Analogue for `ts.LanguageService.getCompletionEntryDetails`.
|
48 | */
|
49 | getCompletionEntryDetails(entryName: string, formatOptions: ts.FormatCodeOptions | ts.FormatCodeSettings | undefined, preferences: ts.UserPreferences | undefined): ts.CompletionEntryDetails | undefined;
|
50 | /**
|
51 | * Analogue for `ts.LanguageService.getCompletionEntrySymbol`.
|
52 | */
|
53 | getCompletionEntrySymbol(name: string): ts.Symbol | undefined;
|
54 | /**
|
55 | * Determine if the current node is the completion of a property expression, and narrow the type
|
56 | * of `this.node` if so.
|
57 | *
|
58 | * This narrowing gives access to additional methods related to completion of property
|
59 | * expressions.
|
60 | */
|
61 | private isPropertyExpressionCompletion;
|
62 | /**
|
63 | * Get completions for property expressions.
|
64 | */
|
65 | private getPropertyExpressionCompletion;
|
66 | /**
|
67 | * Get the details of a specific completion for a property expression.
|
68 | */
|
69 | private getPropertyExpressionCompletionDetails;
|
70 | /**
|
71 | * Get the `ts.Symbol` for a specific completion for a property expression.
|
72 | */
|
73 | private getPropertyExpressionCompletionSymbol;
|
74 | /**
|
75 | * Get completions for a property expression in a global context (e.g. `{{y|}}`).
|
76 | */
|
77 | private getGlobalPropertyExpressionCompletion;
|
78 | /**
|
79 | * Get the details of a specific completion for a property expression in a global context (e.g.
|
80 | * `{{y|}}`).
|
81 | */
|
82 | private getGlobalPropertyExpressionCompletionDetails;
|
83 | /**
|
84 | * Get the `ts.Symbol` of a specific completion for a property expression in a global context
|
85 | * (e.g.
|
86 | * `{{y|}}`).
|
87 | */
|
88 | private getGlobalPropertyExpressionCompletionSymbol;
|
89 | private isElementTagCompletion;
|
90 | private getElementTagCompletion;
|
91 | private getElementTagCompletionDetails;
|
92 | private getElementTagCompletionSymbol;
|
93 | private isElementAttributeCompletion;
|
94 | private getElementAttributeCompletions;
|
95 | private getElementAttributeCompletionDetails;
|
96 | private getElementAttributeCompletionSymbol;
|
97 | private isPipeCompletion;
|
98 | private getPipeCompletions;
|
99 | }
|