mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
strictNullChecks: First batch (#18390)
* First batch of strictNullChecks * Remove undefined * Check an alternative solution * Fix strict nullChecks * Low hanging strictNullChecks * Fixing strict nulls issues and more * Minor change * fixed unit test * Fix feedback * Update public/vendor/ansicolor/ansicolor.ts Co-Authored-By: Dominik Prokop <dominik.prokop@grafana.com> * Update public/vendor/ansicolor/ansicolor.ts Co-Authored-By: Dominik Prokop <dominik.prokop@grafana.com> * Update public/vendor/ansicolor/ansicolor.ts Co-Authored-By: Dominik Prokop <dominik.prokop@grafana.com> * Fix build errors
This commit is contained in:
committed by
Torkel Ödegaard
parent
0b828cfa44
commit
1db9fff056
10
public/vendor/ansicolor/ansicolor.ts
vendored
10
public/vendor/ansicolor/ansicolor.ts
vendored
@@ -60,9 +60,9 @@ const clean = (obj: any) => {
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
class Color {
|
||||
background: boolean;
|
||||
name: string;
|
||||
brightness: number;
|
||||
background?: boolean;
|
||||
name?: string;
|
||||
brightness?: number;
|
||||
|
||||
constructor(background?: boolean, name?: string, brightness?: number) {
|
||||
this.background = background;
|
||||
@@ -82,7 +82,7 @@ class Color {
|
||||
});
|
||||
}
|
||||
|
||||
defaultBrightness(value: number) {
|
||||
defaultBrightness(value?: number) {
|
||||
return new Color(this.background, this.name, this.brightness || value);
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ export default class Colors {
|
||||
|
||||
get parsed() {
|
||||
let styles: Set<string>;
|
||||
let brightness: number;
|
||||
let brightness: number | undefined;
|
||||
let color: Color;
|
||||
let bgColor: Color;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user