1 | /**
|
2 | * @license
|
3 | * Copyright Google LLC All Rights Reserved.
|
4 | *
|
5 | * Use of this source code is governed by an MIT-style license that can be
|
6 | * found in the LICENSE file at https://angular.io/license
|
7 | */
|
8 | /// <amd-module name="@angular/language-service/src/diagnostics" />
|
9 | import { NgAnalyzedModules } from '@angular/compiler';
|
10 | import * as ts from 'typescript';
|
11 | import * as ng from './types';
|
12 | import { TypeScriptServiceHost } from './typescript_host';
|
13 | /**
|
14 | * Return diagnostic information for the parsed AST of the template.
|
15 | * @param ast contains HTML and template AST
|
16 | */
|
17 | export declare function getTemplateDiagnostics(ast: ng.AstResult): ng.Diagnostic[];
|
18 | /**
|
19 | * Performs a variety diagnostics on directive declarations.
|
20 | *
|
21 | * @param declarations Angular directive declarations
|
22 | * @param modules NgModules in the project
|
23 | * @param host TypeScript service host used to perform TypeScript queries
|
24 | * @return diagnosed errors, if any
|
25 | */
|
26 | export declare function getDeclarationDiagnostics(declarations: ng.Declaration[], modules: NgAnalyzedModules, host: Readonly<TypeScriptServiceHost>): ng.Diagnostic[];
|
27 | /**
|
28 | * Convert ng.Diagnostic to ts.Diagnostic.
|
29 | * @param d diagnostic
|
30 | * @param file
|
31 | */
|
32 | export declare function ngDiagnosticToTsDiagnostic(d: ng.Diagnostic, file: ts.SourceFile | undefined): ts.Diagnostic;
|