mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 01:28:26 -05:00
Add more folders to strict compile (#8954)
* add more folders to strictire compile, add more strict compile options * update ci * remove unnecessary assertion
This commit is contained in:
@@ -13,15 +13,15 @@ export const SERVICE_ID = 'dashboardViewService';
|
||||
export interface IDashboardWebview extends IView {
|
||||
setHtml(html: string): void;
|
||||
onMessage: Event<string>;
|
||||
sendMessage(message: string);
|
||||
sendMessage(message: string): void;
|
||||
}
|
||||
|
||||
export interface IDashboardViewService {
|
||||
_serviceBrand: undefined;
|
||||
onRegisteredWebview: Event<IDashboardWebview>;
|
||||
registerWebview(widget: IDashboardWebview);
|
||||
registerWebview(widget: IDashboardWebview): void;
|
||||
onRegisteredModelView: Event<IModelView>;
|
||||
registerModelView(widget: IModelView);
|
||||
registerModelView(widget: IModelView): void;
|
||||
}
|
||||
|
||||
export const IDashboardViewService = createDecorator<IDashboardViewService>(SERVICE_ID);
|
||||
|
||||
@@ -90,7 +90,7 @@ class InsightRegistry implements IInsightRegistry {
|
||||
* @param schema config schema of the widget
|
||||
*/
|
||||
public registerInsight(id: string, description: string, schema: IJSONSchema, ctor: Type<IInsightsView>): InsightIdentifier {
|
||||
this._insightSchema.properties[id] = schema;
|
||||
this._insightSchema.properties![id] = schema;
|
||||
this._idToCtor[id] = ctor;
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export const Extensions = {
|
||||
export interface IComponentRegistry {
|
||||
registerComponentType(id: string, typeMapping: ModelComponentTypes, ctor: Type<IComponent>): ComponentIdentifier;
|
||||
getIdForTypeMapping(typeMapping: ModelComponentTypes): string;
|
||||
getCtorForType(typeMapping: ModelComponentTypes): Type<IComponent>;
|
||||
getCtorForType(typeMapping: ModelComponentTypes): Type<IComponent> | undefined;
|
||||
getCtorFromId(id: string): Type<IComponent>;
|
||||
getAllCtors(): Array<Type<IComponent>>;
|
||||
getAllIds(): Array<string>;
|
||||
@@ -38,7 +38,7 @@ class ComponentRegistry implements IComponentRegistry {
|
||||
return this._typeNameToId[ModelComponentTypes[typeMapping]];
|
||||
}
|
||||
|
||||
public getCtorForType(typeMapping: ModelComponentTypes): Type<IComponent> {
|
||||
public getCtorForType(typeMapping: ModelComponentTypes): Type<IComponent> | undefined {
|
||||
let id = this.getIdForTypeMapping(typeMapping);
|
||||
return id ? this._idToCtor[id] : undefined;
|
||||
}
|
||||
|
||||
@@ -55,14 +55,14 @@ class DashboardWidgetRegistry implements IDashboardWidgetRegistry {
|
||||
this._allSchema.extensionProperties[id] = schema;
|
||||
} else {
|
||||
if (context === undefined || context === 'database') {
|
||||
this._dashboardWidgetSchema.properties[id] = schema;
|
||||
this._dashboardWidgetSchema.properties![id] = schema;
|
||||
}
|
||||
|
||||
if (context === undefined || context === 'server') {
|
||||
this._serverWidgetSchema.properties[id] = schema;
|
||||
this._serverWidgetSchema.properties![id] = schema;
|
||||
}
|
||||
|
||||
this._allSchema.properties[id] = schema;
|
||||
this._allSchema.properties![id] = schema;
|
||||
}
|
||||
|
||||
return id;
|
||||
@@ -77,11 +77,11 @@ class DashboardWidgetRegistry implements IDashboardWidgetRegistry {
|
||||
*/
|
||||
public registerNonCustomDashboardWidget(id: string, description: string, val: IInsightsConfig, context?: 'database' | 'server'): WidgetIdentifier {
|
||||
if (context === undefined || context === 'database') {
|
||||
this._dashboardWidgetSchema.properties[id] = { type: 'null', default: null };
|
||||
this._dashboardWidgetSchema.properties![id] = { type: 'null', default: null };
|
||||
}
|
||||
|
||||
if (context === undefined || context === 'server') {
|
||||
this._serverWidgetSchema.properties[id] = { type: 'null', default: null };
|
||||
this._serverWidgetSchema.properties![id] = { type: 'null', default: null };
|
||||
}
|
||||
|
||||
return id;
|
||||
|
||||
Reference in New Issue
Block a user