From 38fd41ea0be3d35843ae5ff8ad95b9cc7a51700d Mon Sep 17 00:00:00 2001 From: wimbarelds Date: Tue, 1 Aug 2023 16:19:21 +0200 Subject: [PATCH] Make `content` optional for presets in TypeScript types (#11730) * Update config.d.ts, Make array members partial in Config Instead of `Partial>` have `Array>` * simplify types further * update changelog --------- Co-authored-by: Robin Malfait --- CHANGELOG.md | 1 + types/config.d.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f88c80db6..2edfa43f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improve normalisation of `calc()`-like functions ([#11686](https://github.com/tailwindlabs/tailwindcss/pull/11686)) - Skip `calc()` normalisation in nested `theme()` calls ([#11705](https://github.com/tailwindlabs/tailwindcss/pull/11705)) - Fix incorrectly generated CSS when using square brackets inside arbitrary properties ([#11709](https://github.com/tailwindlabs/tailwindcss/pull/11709)) +- Make `content` optional for presets in TypeScript types ([#11730](https://github.com/tailwindlabs/tailwindcss/pull/11730)) ## [3.3.3] - 2023-07-13 diff --git a/types/config.d.ts b/types/config.d.ts index bb40c8b71..6d171ceed 100644 --- a/types/config.d.ts +++ b/types/config.d.ts @@ -46,13 +46,13 @@ type PrefixConfig = string type SeparatorConfig = string // Safelist related config -type SafelistConfig = (string | { pattern: RegExp; variants?: string[] })[] +type SafelistConfig = string | { pattern: RegExp; variants?: string[] } // Blocklist related config -type BlocklistConfig = string[] +type BlocklistConfig = string // Presets related config -type PresetsConfig = Config[] +type PresetsConfig = Partial // Future related config type FutureConfigValues = @@ -352,9 +352,9 @@ interface OptionalConfig { important: Partial prefix: Partial separator: Partial - safelist: Partial - blocklist: Partial - presets: Partial + safelist: Array + blocklist: Array + presets: Array future: Partial experimental: Partial darkMode: Partial