Chore: Fix bunch of strict null error to fix master CI (#23443)

* Fix bunch of null error

* Fix failing test

* Another test fix
This commit is contained in:
Andrej Ocenas
2020-04-08 23:44:10 +02:00
committed by GitHub
parent 363bf7506d
commit 263dcb1452
9 changed files with 26 additions and 21 deletions
@@ -38,7 +38,7 @@ export class PanelPlugin<TOptions = any, TFieldConfigOptions extends object = an
private _optionEditors?: PanelOptionEditorsRegistry;
private registerOptionEditors?: (builder: PanelOptionsEditorBuilder<TOptions>) => void;
panel: ComponentType<PanelProps<TOptions>>;
panel: ComponentType<PanelProps<TOptions>> | null;
editor?: ComponentClass<PanelEditorProps<TOptions>>;
onPanelMigration?: PanelMigrationHandler<TOptions>;
onPanelTypeChanged?: PanelTypeChangedHandler<TOptions>;
@@ -49,7 +49,7 @@ export class PanelPlugin<TOptions = any, TFieldConfigOptions extends object = an
*/
angularPanelCtrl?: any;
constructor(panel: ComponentType<PanelProps<TOptions>>) {
constructor(panel: ComponentType<PanelProps<TOptions>> | null) {
super();
this.panel = panel;
}
+1 -1
View File
@@ -51,7 +51,7 @@ export function findCommonLabels(labelsSets: Labels[]): Labels {
/**
* Returns a map of labels that are in `labels`, but not in `commonLabels`.
*/
export function findUniqueLabels(labels: Labels, commonLabels: Labels): Labels {
export function findUniqueLabels(labels: Labels | undefined, commonLabels: Labels): Labels {
const uncommonLabels: Labels = { ...labels };
Object.keys(commonLabels).forEach(key => {
delete uncommonLabels[key];