@@ -37,12 +37,38 @@ if(!(Test-Path $tsRegKey)){
37
37
}
38
38
39
39
if ($tsScript -ne " " ){
40
- if (! (Test-Path $tsScript )){
41
- Throw " Could not locate the TypeScript language service script at ${tsScript} "
40
+ $tsScriptServices = " ${tsScript} \typescriptServices.js"
41
+ $tsScriptlib = " ${tsScript} \lib.d.ts"
42
+ $tsES6Scriptlib = " ${tsScript} \lib.es6.d.ts"
43
+
44
+ if (! (Test-Path $tsScriptServices )){
45
+ Throw " Could not locate the TypeScript language service script at ${tsScriptServices} "
46
+ }
47
+ else {
48
+ $path = resolve-path ${tsScriptServices}
49
+ Set-ItemProperty - path $tsRegKey - name CustomTypeScriptServicesFileLocation - value " ${path} "
50
+ Write-Host " Enabled custom TypeScript language service at ${path} for Dev${vsVersion} "
51
+ }
52
+
53
+ if (! (Test-Path $tsScriptlib )){
54
+ Throw " Could not locate the TypeScript default library at ${tsScriptlib} "
55
+ }
56
+ else {
57
+ $path = resolve-path ${tsScriptlib}
58
+ Set-ItemProperty - path $tsRegKey - name CustomDefaultLibraryLocation - value " ${path} "
59
+ Write-Host " Enabled custom TypeScript default library at ${path} for Dev${vsVersion} "
60
+ }
61
+
62
+ if (! (Test-Path $tsES6Scriptlib )){
63
+ Throw " Could not locate the TypeScript default ES6 library at ${tsES6Scriptlib} "
64
+ }
65
+ else {
66
+ $path = resolve-path ${tsES6Scriptlib}
67
+ Set-ItemProperty - path $tsRegKey - name CustomDefaultES6LibraryLocation - value " ${path} "
68
+ Write-Host " Enabled custom TypeScript default ES6 library at ${path} for Dev${vsVersion} "
42
69
}
43
- Set-ItemProperty - path $tsRegKey - name CustomTypeScriptServicesFileLocation - value " ${tsScript} "
44
- Write-Host " Enabled custom TypeScript language service at ${tsScript} for Dev${vsVersion} "
45
70
}
71
+
46
72
if ($enableDevMode ){
47
73
Set-ItemProperty - path $tsRegKey - name EnableDevMode - value 1
48
74
Write-Host " Enabled developer mode for Dev${vsVersion} "
0 commit comments