UNPKG

1.68 kBTypeScriptView Raw
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/ivy/language_service_adapter" />
9import { NgCompilerAdapter } from '@angular/compiler-cli/src/ngtsc/core/api';
10import { AbsoluteFsPath } from '@angular/compiler-cli/src/ngtsc/file_system';
11import * as ts from 'typescript/lib/tsserverlibrary';
12export declare class LanguageServiceAdapter implements NgCompilerAdapter {
13 private readonly project;
14 readonly entryPoint: null;
15 readonly constructionDiagnostics: ts.Diagnostic[];
16 readonly ignoreForEmit: Set<ts.SourceFile>;
17 readonly factoryTracker: null;
18 readonly unifiedModulesHost: null;
19 readonly rootDirs: AbsoluteFsPath[];
20 private readonly templateVersion;
21 constructor(project: ts.server.Project);
22 isShim(sf: ts.SourceFile): boolean;
23 fileExists(fileName: string): boolean;
24 readFile(fileName: string): string | undefined;
25 getCurrentDirectory(): string;
26 getCanonicalFileName(fileName: string): string;
27 /**
28 * readResource() is an Angular-specific method for reading files that are not
29 * managed by the TS compiler host, namely templates and stylesheets.
30 * It is a method on ExtendedTsCompilerHost, see
31 * packages/compiler-cli/src/ngtsc/core/api/src/interfaces.ts
32 */
33 readResource(fileName: string): string;
34 isTemplateDirty(fileName: string): boolean;
35}
36export declare function isTypeScriptFile(fileName: string): boolean;
37export declare function isExternalTemplate(fileName: string): boolean;