mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
* Revert "Revert "Remove typings and replace missing methods with vscodes (#8217)" (#8240)"
This reverts commit e801a04bcf.
* fix runtime error
* add tests for chartview
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
|
||||
import { IModelStore, IComponentDescriptor, IComponent } from './interfaces';
|
||||
import { Deferred } from 'sql/base/common/promise';
|
||||
import { entries } from 'sql/base/common/objects';
|
||||
import { entries } from 'sql/base/common/collections';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
|
||||
class ComponentDescriptor implements IComponentDescriptor {
|
||||
constructor(public readonly id: string, public readonly type: string) {
|
||||
@@ -65,7 +66,7 @@ export class ModelStore implements IModelStore {
|
||||
}
|
||||
|
||||
validate(component: IComponent): Thenable<boolean> {
|
||||
let componentId = entries(this._componentMappings).find(([id, mappedComponent]) => component === mappedComponent)[0];
|
||||
let componentId = find(entries(this._componentMappings), ([id, mappedComponent]) => component === mappedComponent)[0];
|
||||
return Promise.all(this._validationCallbacks.map(callback => callback(componentId))).then(validations => validations.every(validation => validation === true));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user