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

This reverts commit 22a427f934.
This commit is contained in:
Elliot Boschwitz
2019-11-06 11:33:55 -08:00
committed by GitHub
parent 3b1eaca58e
commit e801a04bcf
184 changed files with 43388 additions and 634 deletions

View File

@@ -20,7 +20,6 @@ import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { find } from 'vs/base/common/arrays';
@Component({
selector: 'modelview-dropdown',
@@ -156,7 +155,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone
private getSelectedValue(): string {
if (this.values && this.values.length > 0 && this.valuesHaveDisplayName()) {
let selectedValue = <azdata.CategoryValue>this.value || <azdata.CategoryValue>this.values[0];
let valueCategory = find(<azdata.CategoryValue[]>this.values, v => v.name === selectedValue.name);
let valueCategory = (<azdata.CategoryValue[]>this.values).find(v => v.name === selectedValue.name);
return valueCategory && valueCategory.displayName;
} else {
if (!this.value && this.values && this.values.length > 0) {
@@ -168,7 +167,7 @@ export default class DropDownComponent extends ComponentBase implements ICompone
private setSelectedValue(newValue: string): void {
if (this.values && this.valuesHaveDisplayName()) {
let valueCategory = find((<azdata.CategoryValue[]>this.values), v => v.displayName === newValue);
let valueCategory = (<azdata.CategoryValue[]>this.values).find(v => v.displayName === newValue);
this.value = valueCategory;
} else {
this.value = newValue;