remove unused code

This commit is contained in:
Vladimir Matveev 2016-09-02 14:11:52 -07:00
parent ed0ce1650b
commit d61fd4243a
5 changed files with 2 additions and 10 deletions

View file

@ -572,9 +572,6 @@ namespace Harness.LanguageService {
this.writeMessage(message);
}
writeCompressedData() {
}
readFile(fileName: string): string {
if (fileName.indexOf(Harness.Compiler.defaultLibFileName) >= 0) {
fileName = Harness.Compiler.defaultLibFileName;

View file

@ -29,9 +29,6 @@ namespace ts {
writeFile: (path: string, data: string, writeByteOrderMark?: boolean) => {
throw new Error("NYI");
},
writeCompressedData() {
throw new Error("NYI");
},
resolvePath: (path: string): string => {
throw new Error("NYI");
},

View file

@ -23,8 +23,7 @@ namespace ts.server {
setTimeout(callback, ms, ...args) { return 0; },
clearTimeout(timeoutId) { },
setImmediate: () => 0,
clearImmediate() {},
writeCompressedData() {}
clearImmediate() {}
};
const nullCancellationToken: HostCancellationToken = { isCancellationRequested: () => false };
const mockLogger: Logger = {

View file

@ -14,7 +14,6 @@ declare namespace ts.server {
clearTimeout(timeoutId: any): void;
setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
clearImmediate(timeoutId: any): void;
writeCompressedData(prefix: string, data: CompressedData, suffix: string): void;
gc?(): void;
trace?(s: string): void;
}

View file

@ -106,7 +106,7 @@ function writeFile(p: string, data: any, opts: { recursive: boolean }) {
function mkdir(p: string) {
const basePath = path.dirname(p);
let shouldCreateParent = p !== basePath && !fs.existsSync(basePath);
const shouldCreateParent = p !== basePath && !fs.existsSync(basePath);
if (shouldCreateParent) {
mkdir(basePath);
}