diff --git a/news/3 Code Health/8395.md b/news/3 Code Health/8395.md new file mode 100644 index 000000000000..39e916f1767a --- /dev/null +++ b/news/3 Code Health/8395.md @@ -0,0 +1 @@ +Update TypeScript to `3.7`. diff --git a/package-lock.json b/package-lock.json index 39679948ba9d..dee0fb675081 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18498,9 +18498,9 @@ } }, "typescript": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", - "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", + "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==", "dev": true }, "typescript-char": { diff --git a/package.json b/package.json index 38900e84d328..c8bf7fb8ba13 100644 --- a/package.json +++ b/package.json @@ -2896,7 +2896,7 @@ "tslint-microsoft-contrib": "^5.0.3", "typed-react-markdown": "^0.1.0", "typemoq": "^2.1.0", - "typescript": "^3.6.4", + "typescript": "^3.7.2", "typescript-formatter": "^7.1.0", "unicode-properties": "1.1.0", "url-loader": "^1.1.2", diff --git a/src/client/datascience/jupyter/notebookStarter.ts b/src/client/datascience/jupyter/notebookStarter.ts index 8133f1ef6f0e..4d64251f1a20 100644 --- a/src/client/datascience/jupyter/notebookStarter.ts +++ b/src/client/datascience/jupyter/notebookStarter.ts @@ -74,7 +74,7 @@ export class NotebookStarter implements Disposable { // Then use this to launch our notebook process. const stopWatch = new StopWatch(); - const launchResult = await notebookCommand.command!.execObservable(args, { throwOnStdErr: false, encoding: 'utf8', token: cancelToken }); + const launchResult = await notebookCommand.command!.execObservable(args as string[], { throwOnStdErr: false, encoding: 'utf8', token: cancelToken }); // Watch for premature exits if (launchResult.proc) { diff --git a/src/client/extension.ts b/src/client/extension.ts index eb27073ed60c..f77fb2b262c7 100644 --- a/src/client/extension.ts +++ b/src/client/extension.ts @@ -353,7 +353,7 @@ async function getActivationTelemetryProps(serviceContainer: IServiceContainer): const preferredWorkspaceInterpreter = getPreferredWorkspaceInterpreter(mainWorkspaceUri, serviceContainer); const usingGlobalInterpreter = isUsingGlobalInterpreterInWorkspace(settings.pythonPath, serviceContainer); const usingAutoSelectedWorkspaceInterpreter = preferredWorkspaceInterpreter ? settings.pythonPath === getPreferredWorkspaceInterpreter(mainWorkspaceUri, serviceContainer) : false; - const hasPython3 = interpreters + const hasPython3 = interpreters! .filter(item => item && item.version ? item.version.major === 3 : false) .length > 0; diff --git a/src/client/interpreter/locators/services/baseVirtualEnvService.ts b/src/client/interpreter/locators/services/baseVirtualEnvService.ts index c84f457c28bc..4b46de4a2261 100644 --- a/src/client/interpreter/locators/services/baseVirtualEnvService.ts +++ b/src/client/interpreter/locators/services/baseVirtualEnvService.ts @@ -6,7 +6,7 @@ import { Uri } from 'vscode'; import { traceError } from '../../../common/logger'; import { IFileSystem, IPlatformService } from '../../../common/platform/types'; import { IServiceContainer } from '../../../ioc/types'; -import { IInterpreterHelper, IVirtualEnvironmentsSearchPathProvider, PythonInterpreter } from '../../contracts'; +import { IInterpreterHelper, InterpreterType, IVirtualEnvironmentsSearchPathProvider, PythonInterpreter } from '../../contracts'; import { IVirtualEnvironmentManager } from '../../virtualEnvs/types'; import { lookForInterpretersInDirectory } from '../helpers'; import { CacheableLocatorService } from './cacheableLocatorService'; @@ -82,7 +82,7 @@ export class BaseVirtualEnvService extends CacheableLocatorService { return { ...(details as PythonInterpreter), envName: virtualEnvName, - type: type + type: type! as InterpreterType }; }); } diff --git a/src/client/interpreter/locators/services/windowsRegistryService.ts b/src/client/interpreter/locators/services/windowsRegistryService.ts index 3c87f4856fd7..e99f29a1be66 100644 --- a/src/client/interpreter/locators/services/windowsRegistryService.ts +++ b/src/client/interpreter/locators/services/windowsRegistryService.ts @@ -120,7 +120,7 @@ export class WindowsRegistryService extends CacheableLocatorService { this.registry.getValue(tagKey, hive, arch, 'SysVersion'), this.getCompanyDisplayName(companyKey, hive, arch) ]).then(([installedPath, executablePath, version, companyDisplayName]) => { - companyDisplayName = AnacondaCompanyNames.indexOf(companyDisplayName) === -1 ? companyDisplayName : AnacondaCompanyName; + companyDisplayName = AnacondaCompanyNames.indexOf(companyDisplayName!) === -1 ? companyDisplayName : AnacondaCompanyName; // tslint:disable-next-line:prefer-type-cast no-object-literal-type-assertion return { installPath: installedPath, executablePath, version, companyDisplayName } as InterpreterInformation; });