Strict null on some query and connection (#7300)

* wip

* make connection work with strict-nulls

* change comments

* fix tests; remove unneeded type forcing

* address feedback

* adjust the logic of query editor

* clean up typing
This commit is contained in:
Anthony Dresser
2019-10-21 15:50:12 -07:00
committed by GitHub
parent 6a375fdd8c
commit 06e86e57e7
22 changed files with 367 additions and 369 deletions

View File

@@ -11,7 +11,7 @@ import { Schemas } from 'vs/base/common/network';
export const FILE_SCHEMA: string = 'file';
export function resolveCurrentDirectory(uri: string, rootPath: string): string | undefined {
export function resolveCurrentDirectory(uri: string, rootPath?: string): string | undefined {
let sqlUri = URI.parse(uri);
let currentDirectory: string | undefined;
@@ -30,7 +30,7 @@ export function resolveCurrentDirectory(uri: string, rootPath: string): string |
return currentDirectory;
}
export function resolveFilePath(uri: string, filePath: string, rootPath: string): string | undefined {
export function resolveFilePath(uri: string, filePath: string, rootPath?: string): string | undefined {
let currentDirectory = resolveCurrentDirectory(uri, rootPath);
if (currentDirectory) {
return normalize(join(currentDirectory, filePath));