mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-27 09:09:14 -04:00
Fix type error
This commit is contained in:
1 parent
00fd73ddd5
commit
1ed349cab3
2 files changed
+10
-10
No files matched your search
@@ -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
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user