Color.Format.Css.format does not return null, so the return type can be made more strict. (#124568)

This commit is contained in:
Henning Dieterichs 2021-05-26 14:13:00 +02:00 committed by GitHub
parent dff33d7324
commit 0688745e82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -523,7 +523,7 @@ export namespace Color {
/**
* 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()) {
return Color.Format.CSS.formatHex(color);
}