Color.Format.Css.format does not return null, so the return type can be made more strict. (#124568)
This commit is contained in:
parent
dff33d7324
commit
0688745e82
|
@ -523,7 +523,7 @@ export namespace Color {
|
||||||
/**
|
/**
|
||||||
* The default format will use HEX if opaque and RGBA otherwise.
|
* The default format will use HEX if opaque and RGBA otherwise.
|
||||||
*/
|
*/
|
||||||
export function format(color: Color): string | null {
|
export function format(color: Color): string {
|
||||||
if (color.isOpaque()) {
|
if (color.isOpaque()) {
|
||||||
return Color.Format.CSS.formatHex(color);
|
return Color.Format.CSS.formatHex(color);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue