UNPKG

1.14 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 */
8import ts from 'typescript';
9import { FileSystem } from './types';
10export declare class NgtscCompilerHost implements ts.CompilerHost {
11 protected fs: FileSystem;
12 protected options: ts.CompilerOptions;
13 constructor(fs: FileSystem, options?: ts.CompilerOptions);
14 getSourceFile(fileName: string, languageVersion: ts.ScriptTarget): ts.SourceFile | undefined;
15 getDefaultLibFileName(options: ts.CompilerOptions): string;
16 getDefaultLibLocation(): string;
17 writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError: ((message: string) => void) | undefined, sourceFiles?: ReadonlyArray<ts.SourceFile>): void;
18 getCurrentDirectory(): string;
19 getCanonicalFileName(fileName: string): string;
20 useCaseSensitiveFileNames(): boolean;
21 getNewLine(): string;
22 fileExists(fileName: string): boolean;
23 readFile(fileName: string): string | undefined;
24 realpath(path: string): string;
25}