MCPcopy Index your code
hub / github.com/angular/angular / createHost

Function createHost

packages/language-service/test/legacy/mock_host.ts:117–145  ·  view source on GitHub ↗
(configFileFs: MockConfigFileFs)

Source from the content-addressed store, hash-verified

115}
116
117function createHost(configFileFs: MockConfigFileFs): ts.server.ServerHost {
118 return {
119 ...ts.sys,
120 fileExists(absPath: string): boolean {
121 return configFileFs.fileExists(absPath);
122 },
123 readFile(absPath: string, encoding?: string): string | undefined {
124 return configFileFs.readFile(absPath, encoding);
125 },
126 watchFile(path: string, callback: ts.FileWatcherCallback): ts.FileWatcher {
127 return configFileFs.watchFile(path, callback);
128 },
129 watchDirectory(path: string, callback: ts.DirectoryWatcherCallback): ts.FileWatcher {
130 return NOOP_FILE_WATCHER;
131 },
132 setTimeout(callback: (...args: any[]) => void, delay: number, ...args: any[]) {
133 return setTimeout(callback, delay, ...args);
134 },
135 clearTimeout(id: any) {
136 clearTimeout(id);
137 },
138 setImmediate() {
139 throw new Error('setImmediate is not implemented');
140 },
141 clearImmediate() {
142 throw new Error('clearImmediate is not implemented');
143 },
144 };
145}
146
147/**
148 * Create a ConfiguredProject and an actual program for the test project located

Callers 1

setupFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…