Skip to content

Commit

Permalink
Update typescript to 3.7 (#8396)
Browse files Browse the repository at this point in the history
* Update typescript to 3.7

* Fix compiler issues
  • Loading branch information
DonJayamanne authored Nov 6, 2019
1 parent 9db47aa commit 96d19a5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions news/3 Code Health/8395.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update TypeScript to `3.7`.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/client/datascience/jupyter/notebookStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -82,7 +82,7 @@ export class BaseVirtualEnvService extends CacheableLocatorService {
return {
...(details as PythonInterpreter),
envName: virtualEnvName,
type: type
type: type! as InterpreterType
};
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit 96d19a5

Please sign in to comment.