igniteui-angular
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
69 lines (68 loc) • 2.78 kB
TypeScript
import type { Tree } from '@angular-devkit/schematics';
import * as ts from 'typescript/lib/tsserverlibrary';
/**
* Language server host is responsible for **most** of the FS operations / checks
* Angular's Ivy LS sometimes bypasses these, calling path methods instead of tsLsHost operations
*/
export declare class ServerHost implements ts.server.ServerHost {
host: Tree;
readonly args: string[];
readonly newLine: string;
readonly useCaseSensitiveFileNames: boolean;
/** Cached because Angular schematics encapsulation's customRequire doesn't provide `resolve` */
private nativeRequire;
constructor(host: Tree);
/**
* Read a file's content from the Virtual Tree
* If file does not exist in virtual tree, check in physical FS
*/
readFile(path: string, encoding?: BufferEncoding): string | undefined;
getFileSize(path: string): number;
watchFile(_path: string, _callback: ts.FileWatcherCallback, _pollingInterval?: number): ts.FileWatcher;
watchDirectory(_path: string, _callback: ts.DirectoryWatcherCallback, _recursive?: boolean): ts.FileWatcher;
resolvePath(path: string): string;
/**
* Checks for file in Virtual Tree w/ relative path
* If file does not exist in virtual tree, check in physical FS
*/
fileExists(path: string): boolean;
directoryExists(path: string): boolean;
getExecutingFilePath(): string;
getCurrentDirectory(): string;
/**
* Get all subdirs of a directory from the Tree mapped to absolute paths
*/
getDirectories(path: string): string[];
/**
* Get all files of a directory from the Tree mapped to absolute paths
*/
readDirectory(path: string): string[];
require(initialPath: string, moduleName: string): {
module: any;
error: any;
} | {
module: any;
error: Error;
};
gc(): void;
trace(_s: string): void;
getModifiedTime(path: string): Date | undefined;
realpath(path: string): string;
createSHA256Hash(data: string): string;
write(data: string): void;
writeOutputIsTTY(): boolean;
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
createDirectory(path: string): void;
setModifiedTime(path: string, time: Date): void;
deleteFile(path: string): void;
createHash(data: string): string;
getMemoryUsage(): number;
exit(exitCode?: number): void;
setTimeout(callback: (...argsv: any[]) => void, ms: number, ...args: any[]): any;
clearTimeout(timeoutId: any): void;
clearScreen(): void;
base64decode(input: string): string;
base64encode(input: string): string;
setImmediate(callback: (...argsv: any[]) => void, ...args: any[]): any;
clearImmediate(timeoutId: any): void;
}