UNPKG

1.83 kBTypeScriptView Raw
1/// <amd-module name="@angular/language-service/ivy/quick_info" />
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9import { AST, TmplAstNode } from '@angular/compiler';
10import { NgCompiler } from '@angular/compiler-cli/src/ngtsc/core';
11import * as ts from 'typescript';
12import { DisplayInfoKind } from './display_parts';
13export declare class QuickInfoBuilder {
14 private readonly tsLS;
15 private readonly compiler;
16 private readonly component;
17 private node;
18 private readonly typeChecker;
19 constructor(tsLS: ts.LanguageService, compiler: NgCompiler, component: ts.ClassDeclaration, node: TmplAstNode | AST);
20 get(): ts.QuickInfo | undefined;
21 private getQuickInfoForSymbol;
22 private getQuickInfoForBindingSymbol;
23 private getQuickInfoForElementSymbol;
24 private getQuickInfoForVariableSymbol;
25 private getQuickInfoForReferenceSymbol;
26 private getQuickInfoForPipeSymbol;
27 private getQuickInfoForDomBinding;
28 private getQuickInfoForDirectiveSymbol;
29 private getDocumentationFromTypeDefAtLocation;
30 private getQuickInfoAtShimLocation;
31}
32/**
33 * Construct a QuickInfo object taking into account its container and type.
34 * @param name Name of the QuickInfo target
35 * @param kind component, directive, pipe, etc.
36 * @param textSpan span of the target
37 * @param containerName either the Symbol's container or the NgModule that contains the directive
38 * @param type user-friendly name of the type
39 * @param documentation docstring or comment
40 */
41export declare function createQuickInfo(name: string, kind: DisplayInfoKind, textSpan: ts.TextSpan, containerName?: string, type?: string, documentation?: ts.SymbolDisplayPart[]): ts.QuickInfo;