Skip to content

Commit bc71ef0

Browse files
Remove unnecessary LS code.
1 parent 87ebb6b commit bc71ef0

File tree

4 files changed

+2
-47
lines changed

4 files changed

+2
-47
lines changed

src/services/compiler/diagnostics.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,11 @@
1717

1818
module TypeScript {
1919
export interface Logger {
20-
information(): boolean;
21-
debug(): boolean;
22-
warning(): boolean;
23-
error(): boolean;
24-
fatal(): boolean;
2520
log(s: string): void;
2621
}
2722

2823
export class NullLogger implements Logger {
29-
public information(): boolean { return false; }
30-
public debug(): boolean { return false; }
31-
public warning(): boolean { return false; }
32-
public error(): boolean { return false; }
33-
public fatal(): boolean { return false; }
3424
public log(s: string): void {
3525
}
3626
}
37-
38-
export function timeFunction(logger: Logger, funcDescription: string, func: () => any): any {
39-
var start = (new Date()).getTime();
40-
var result = func();
41-
var end = (new Date()).getTime();
42-
if (logger.information()) {
43-
logger.log(funcDescription + " completed in " + (end - start) + " msec");
44-
}
45-
return result;
46-
}
4727
}

src/services/formatting/rulesProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ module TypeScript.Services.Formatting {
4040

4141
public ensureUpToDate(options: ts.FormatCodeOptions) {
4242
if (this.options == null || !ts.compareDataObjects(this.options, options)) {
43-
var activeRules: Rule[] = TypeScript.timeFunction(this.logger, "RulesProvider: createActiveRules()", () => { return this.createActiveRules(options); });
44-
var rulesMap: RulesMap = TypeScript.timeFunction(this.logger, "RulesProvider: RulesMap.create()", () => { return RulesMap.create(activeRules); });
43+
var activeRules = this.createActiveRules(options);
44+
var rulesMap = RulesMap.create(activeRules);
4545

4646
this.activeRules = activeRules;
4747
this.rulesMap = rulesMap;

src/services/services.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,6 @@ module ts {
432432
}
433433

434434
export interface Logger {
435-
information(): boolean;
436-
debug(): boolean;
437-
warning(): boolean;
438-
error(): boolean;
439-
fatal(): boolean;
440435
log(s: string): void;
441436
}
442437

src/services/shims.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -307,26 +307,6 @@ module ts {
307307
constructor(private shimHost: LanguageServiceShimHost) {
308308
}
309309

310-
public information(): boolean {
311-
return this.shimHost.information();
312-
}
313-
314-
public debug(): boolean {
315-
return this.shimHost.debug();
316-
}
317-
318-
public warning(): boolean {
319-
return this.shimHost.warning();
320-
}
321-
322-
public error(): boolean {
323-
return this.shimHost.error();
324-
}
325-
326-
public fatal(): boolean {
327-
return this.shimHost.fatal();
328-
}
329-
330310
public log(s: string): void {
331311
this.shimHost.log(s);
332312
}

0 commit comments

Comments
 (0)