Make content optional for presets in TypeScript types (#11730)

* Update config.d.ts, Make array members partial in Config

Instead of `Partial<Array<Thing>>` have `Array<Partial<Thing>>`

* simplify types further

* update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
wimbarelds 2023-08-01 16:19:21 +02:00 committed by Jordan Pittman
parent 808c1f0516
commit 38fd41ea0b
2 changed files with 7 additions and 6 deletions

View File

@ -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

12
types/config.d.ts vendored
View File

@ -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<Config>
// Future related config
type FutureConfigValues =
@ -352,9 +352,9 @@ interface OptionalConfig {
important: Partial<ImportantConfig>
prefix: Partial<PrefixConfig>
separator: Partial<SeparatorConfig>
safelist: Partial<SafelistConfig>
blocklist: Partial<BlocklistConfig>
presets: Partial<PresetsConfig>
safelist: Array<SafelistConfig>
blocklist: Array<BlocklistConfig>
presets: Array<PresetsConfig>
future: Partial<FutureConfig>
experimental: Partial<ExperimentalConfig>
darkMode: Partial<DarkModeConfig>