Remove typings and replace missing methods with vscodes (#8217)

* remove typings and replace missing methods with vscodes

* fix strict-null-checks

* fix tests
This commit is contained in:
Anthony Dresser
2019-11-05 13:03:20 -08:00
committed by GitHub
parent 4645a8ba6b
commit 22a427f934
184 changed files with 634 additions and 43388 deletions

View File

@@ -16,6 +16,7 @@ import { NotebookInput } from 'sql/workbench/parts/notebook/browser/models/noteb
import { INotebookService } from 'sql/workbench/services/notebook/browser/notebookService';
import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput';
import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput';
import { find } from 'vs/base/common/arrays';
////// Exported public functions/vars
@@ -217,11 +218,11 @@ function hasFileExtension(extensions: string[], input: EditorInput, checkUntitle
let lastPeriodIndex = input.getName().lastIndexOf('.');
if (lastPeriodIndex > -1) {
let extension: string = input.getName().substr(lastPeriodIndex + 1).toUpperCase();
return !!extensions.find(x => x === extension);
return !!find(extensions, x => x === extension);
}
// Check for untitled file type
if (checkUntitledFileType && input.getName().includes(untitledFilePrefix)) {
if (checkUntitledFileType && find(input.getName(), x => x === untitledFilePrefix)) {
return true;
}