Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make content optional for presets in TypeScript types #11730

Merged
merged 3 commits into from
Aug 1, 2023

Conversation

wimbarelds
Copy link
Contributor

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

Fixes: #11725

Also applies the same fix to safelist and blocklist properties of Config type.

Instead of `Partial<Array<Thing>>` have `Array<Partial<Thing>>`
@RobinMalfait RobinMalfait self-assigned this Aug 1, 2023
@RobinMalfait RobinMalfait changed the title Update config.d.ts, Make array members partial in Config Make content optional for presets in TypeScript types Aug 1, 2023
@RobinMalfait RobinMalfait merged commit 0f0d060 into tailwindlabs:master Aug 1, 2023
10 checks passed
@RobinMalfait
Copy link
Contributor

Hey, thanks so much for this contribution! 🙏

I made a few small adjustments, but these types make more sense now, thanks!

thecrypticace pushed a commit that referenced this pull request Oct 23, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript type for presets should allow config without content property
2 participants