From 94bb0c9426db336dd479e17bd916d4cdaa1c2ea4 Mon Sep 17 00:00:00 2001 From: rindeal Date: Mon, 9 Sep 2024 07:02:58 +0200 Subject: [PATCH] fix: ColorTheme type Partial is needed to support: ```ts const theme = { ...defaultOptions.colors!, ...options.colors }; ``` The callable type then allows to use multiple stylings like bold+red, or even completely custom stylings. --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index cdd7ed8..8dbda55 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,9 +4,9 @@ import { Color } from 'colorette'; export { colorette as color }; -export type ColorTheme = Record; +export type ColorTheme = Partial string)>>; -const defaultTheme: ColorTheme = { +const defaultTheme: Record = { Whitespace: colorette.gray, Brace: colorette.gray, Bracket: colorette.gray,