Merge from vscode 27ada910e121e23a6d95ecca9cae595fb98ab568

This commit is contained in:
ADS Merger
2020-04-30 00:53:43 +00:00
parent 87e5239713
commit 93f35ca321
413 changed files with 7190 additions and 8756 deletions

View File

@@ -91,13 +91,13 @@ export class Insight {
private findctor(type: ChartType | InsightType): IInsightCtor {
if (find(Graph.types, x => x === type as ChartType)) {
return Graph;
return Graph as IInsightCtor;
} else if (find(ImageInsight.types, x => x === type as InsightType)) {
return ImageInsight;
return ImageInsight as IInsightCtor;
} else if (find(TableInsight.types, x => x === type as InsightType)) {
return TableInsight;
return TableInsight as IInsightCtor;
} else if (find(CountInsight.types, x => x === type as InsightType)) {
return CountInsight;
return CountInsight as IInsightCtor;
}
return undefined;
}

View File

@@ -8,6 +8,7 @@ import { mixin } from 'sql/base/common/objects';
import * as types from 'vs/base/common/types';
import { IInsightOptions, InsightType, ChartType } from 'sql/workbench/contrib/charts/common/interfaces';
import { IInsightData } from 'sql/platform/dashboard/browser/insightRegistry';
import { BrandedService } from 'vs/platform/instantiation/common/instantiation';
export interface IPointDataSet {
data: Array<{ x: number | string, y: number }>;
@@ -42,6 +43,6 @@ export interface IInsight {
}
export interface IInsightCtor {
new(container: HTMLElement, options: IInsightOptions, ...services: { _serviceBrand: undefined; }[]): IInsight;
new <Services extends BrandedService[]>(container: HTMLElement, options: IInsightOptions, ...services: Services): IInsight;
readonly types: Array<InsightType | ChartType>;
}