Salsa: adding ScriptKind to ensure script blocks (.html, .aspx, .ascx, etc) are processed as JS

This commit is contained in:
Jason Ramsay
2016-02-16 17:37:24 -08:00
parent af9dc41747
commit a71fa457bd
6 changed files with 67 additions and 32 deletions

View File

@@ -183,6 +183,7 @@ namespace Harness.LanguageService {
const script = this.getScriptInfo(fileName);
return script ? new ScriptSnapshot(script) : undefined;
}
getScriptKind(fileName: string): ScriptKind { return ScriptKind.Unknown; }
getScriptVersion(fileName: string): string {
const script = this.getScriptInfo(fileName);
return script ? script.version.toString() : undefined;
@@ -253,6 +254,7 @@ namespace Harness.LanguageService {
const nativeScriptSnapshot = this.nativeHost.getScriptSnapshot(fileName);
return nativeScriptSnapshot && new ScriptSnapshotProxy(nativeScriptSnapshot);
}
getScriptKind(fileName: string): ScriptKind { return this.nativeHost.getScriptKind(fileName); }
getScriptVersion(fileName: string): string { return this.nativeHost.getScriptVersion(fileName); }
getLocalizedDiagnosticMessages(): string { return JSON.stringify({}); }