mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Treat Script Tag Contents in HTML as JS (#25847)
**Bug** Script contents in html are treated as typescript instead of javascript **Fix** Explicitly set the script kind to js Fixes #25846
This commit is contained in:
parent
710b7b4509
commit
1a8b7a7dc7
|
@ -30,9 +30,10 @@ export function getJavascriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
|||
scriptFileVersion++;
|
||||
}
|
||||
}
|
||||
let host = {
|
||||
const host: ts.LanguageServiceHost = {
|
||||
getCompilationSettings: () => compilerOptions,
|
||||
getScriptFileNames: () => [FILE_NAME, JQUERY_D_TS],
|
||||
getScriptKind: () => ts.ScriptKind.JS,
|
||||
getScriptVersion: (fileName: string) => {
|
||||
if (fileName === FILE_NAME) {
|
||||
return String(scriptFileVersion);
|
||||
|
|
Loading…
Reference in a new issue