1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import { ConfigurationHost } from '@angular/compiler-cli';
|
11 | import { NgCompilerAdapter } from '@angular/compiler-cli/src/ngtsc/core/api';
|
12 | import { AbsoluteFsPath, FileStats, PathSegment, PathString } from '@angular/compiler-cli/src/ngtsc/file_system';
|
13 | import * as ts from 'typescript/lib/tsserverlibrary';
|
14 | export declare class LanguageServiceAdapter implements NgCompilerAdapter {
|
15 | private readonly project;
|
16 | readonly entryPoint: null;
|
17 | readonly constructionDiagnostics: ts.Diagnostic[];
|
18 | readonly ignoreForEmit: Set<ts.SourceFile>;
|
19 | readonly factoryTracker: null;
|
20 | readonly unifiedModulesHost: null;
|
21 | readonly rootDirs: AbsoluteFsPath[];
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 | private readonly lastReadResourceVersion;
|
28 | constructor(project: ts.server.Project);
|
29 | isShim(sf: ts.SourceFile): boolean;
|
30 | fileExists(fileName: string): boolean;
|
31 | readFile(fileName: string): string | undefined;
|
32 | getCurrentDirectory(): string;
|
33 | getCanonicalFileName(fileName: string): string;
|
34 | /**
|
35 | * Return the real path of a symlink. This method is required in order to
|
36 | * resolve symlinks in node_modules.
|
37 | */
|
38 | realpath(path: string): string;
|
39 | /**
|
40 | * readResource() is an Angular-specific method for reading files that are not
|
41 | * managed by the TS compiler host, namely templates and stylesheets.
|
42 | * It is a method on ExtendedTsCompilerHost, see
|
43 | * packages/compiler-cli/src/ngtsc/core/api/src/interfaces.ts
|
44 | */
|
45 | readResource(fileName: string): string;
|
46 | getModifiedResourceFiles(): Set<string> | undefined;
|
47 | }
|
48 | /**
|
49 | * Used to read configuration files.
|
50 | *
|
51 | * A language service parse configuration host is independent of the adapter
|
52 | * because signatures of calls like `FileSystem#readFile` are a bit stricter
|
53 | * than those on the adapter.
|
54 | */
|
55 | export declare class LSParseConfigHost implements ConfigurationHost {
|
56 | private readonly serverHost;
|
57 | constructor(serverHost: ts.server.ServerHost);
|
58 | exists(path: AbsoluteFsPath): boolean;
|
59 | readFile(path: AbsoluteFsPath): string;
|
60 | lstat(path: AbsoluteFsPath): FileStats;
|
61 | pwd(): AbsoluteFsPath;
|
62 | extname(path: AbsoluteFsPath | PathSegment): string;
|
63 | resolve(...paths: string[]): AbsoluteFsPath;
|
64 | dirname<T extends PathString>(file: T): T;
|
65 | join<T extends PathString>(basePath: T, ...paths: string[]): T;
|
66 | }
|