Fix type error

This commit is contained in:
Gregory Schier committed 2020-02-04 15:08:05 -05:00
1 parent 00fd73ddd5
commit 1ed349cab3
2 files changed
+10 -10

No files matched your search

+3 -8
View File
@@ -138,14 +138,9 @@ function getThemeBlockCSS(block?: ThemeBlock): string {
try {
const parsedColor = Color(value);
addVar(variable, parsedColor.rgb().string());
addVar(
`${variable}-rgb`,
parsedColor
.rgb()
.array()
.join(', '),
);
const rgb = parsedColor.rgb();
addVar(variable, rgb.string());
addVar(`${variable}-rgb`, rgb.array().join(', '));
} catch (err) {
console.log('Failed to parse theme color', value);
}
+7 -2
View File
@@ -2,9 +2,14 @@
declare class Color {
constructor(cssColor: string): Color;
rgb: () => Object;
rgb(): Object;
}
declare module 'color' {
declare module.exports: typeof NeDB;
declare module.exports: (cssColor: string) => {
rgb: () => {
array: () => Array<number>,
string: () => string,
},
}
}