Skip to content

Commit 96d19a5

Browse files
authored
Update typescript to 3.7 (microsoft#8396)
* Update typescript to 3.7 * Fix compiler issues
1 parent 9db47aa commit 96d19a5

7 files changed

Lines changed: 10 additions & 9 deletions

File tree

news/3 Code Health/8395.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update TypeScript to `3.7`.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,7 @@
28962896
"tslint-microsoft-contrib": "^5.0.3",
28972897
"typed-react-markdown": "^0.1.0",
28982898
"typemoq": "^2.1.0",
2899-
"typescript": "^3.6.4",
2899+
"typescript": "^3.7.2",
29002900
"typescript-formatter": "^7.1.0",
29012901
"unicode-properties": "1.1.0",
29022902
"url-loader": "^1.1.2",

src/client/datascience/jupyter/notebookStarter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class NotebookStarter implements Disposable {
7474

7575
// Then use this to launch our notebook process.
7676
const stopWatch = new StopWatch();
77-
const launchResult = await notebookCommand.command!.execObservable(args, { throwOnStdErr: false, encoding: 'utf8', token: cancelToken });
77+
const launchResult = await notebookCommand.command!.execObservable(args as string[], { throwOnStdErr: false, encoding: 'utf8', token: cancelToken });
7878

7979
// Watch for premature exits
8080
if (launchResult.proc) {

src/client/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer):
353353
const preferredWorkspaceInterpreter = getPreferredWorkspaceInterpreter(mainWorkspaceUri, serviceContainer);
354354
const usingGlobalInterpreter = isUsingGlobalInterpreterInWorkspace(settings.pythonPath, serviceContainer);
355355
const usingAutoSelectedWorkspaceInterpreter = preferredWorkspaceInterpreter ? settings.pythonPath === getPreferredWorkspaceInterpreter(mainWorkspaceUri, serviceContainer) : false;
356-
const hasPython3 = interpreters
356+
const hasPython3 = interpreters!
357357
.filter(item => item && item.version ? item.version.major === 3 : false)
358358
.length > 0;
359359

src/client/interpreter/locators/services/baseVirtualEnvService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Uri } from 'vscode';
66
import { traceError } from '../../../common/logger';
77
import { IFileSystem, IPlatformService } from '../../../common/platform/types';
88
import { IServiceContainer } from '../../../ioc/types';
9-
import { IInterpreterHelper, IVirtualEnvironmentsSearchPathProvider, PythonInterpreter } from '../../contracts';
9+
import { IInterpreterHelper, InterpreterType, IVirtualEnvironmentsSearchPathProvider, PythonInterpreter } from '../../contracts';
1010
import { IVirtualEnvironmentManager } from '../../virtualEnvs/types';
1111
import { lookForInterpretersInDirectory } from '../helpers';
1212
import { CacheableLocatorService } from './cacheableLocatorService';
@@ -82,7 +82,7 @@ export class BaseVirtualEnvService extends CacheableLocatorService {
8282
return {
8383
...(details as PythonInterpreter),
8484
envName: virtualEnvName,
85-
type: type
85+
type: type! as InterpreterType
8686
};
8787
});
8888
}

src/client/interpreter/locators/services/windowsRegistryService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class WindowsRegistryService extends CacheableLocatorService {
120120
this.registry.getValue(tagKey, hive, arch, 'SysVersion'),
121121
this.getCompanyDisplayName(companyKey, hive, arch)
122122
]).then(([installedPath, executablePath, version, companyDisplayName]) => {
123-
companyDisplayName = AnacondaCompanyNames.indexOf(companyDisplayName) === -1 ? companyDisplayName : AnacondaCompanyName;
123+
companyDisplayName = AnacondaCompanyNames.indexOf(companyDisplayName!) === -1 ? companyDisplayName : AnacondaCompanyName;
124124
// tslint:disable-next-line:prefer-type-cast no-object-literal-type-assertion
125125
return { installPath: installedPath, executablePath, version, companyDisplayName } as InterpreterInformation;
126126
});

0 commit comments

Comments
 (0)