Skip to content

Commit 783b323

Browse files
Export Config type (#14360)
Right now the following does not work and instead produces a type error: ``` import { type Config } from 'tailwindcss' export default { // … config here } satisfies Config ``` We were not exporting a `Config` type but thankfully this already exists in the codebase so we just need to export it. It does _not_ have all properties of an existing config as not all features have been implemented (or in some cases necessary / relevant for v4). Notably missing are: - `important` - `prefix` - `separator` - `safelist` - `blocklist` - `future` - `experimental` - `corePlugins` Also, explicit keys for theme are not currently specified but we should probably bring this back even if just as an auto-complete aid.
1 parent b1e22e1 commit 783b323

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Support CSS `theme()` functions inside other `@custom-media`, `@container`, and `@supports` rules ([#14358])(https://github.com/tailwindlabs/tailwindcss/pull/14358)
13+
- Export `Config` type from `tailwindcss` for JS config files ([#14360])(https://github.com/tailwindlabs/tailwindcss/pull/14360)
1314

1415
### Fixed
1516

packages/tailwindcss/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { buildDesignSystem, type DesignSystem } from './design-system'
99
import { registerPlugins, type CssPluginOptions, type Plugin } from './plugin-api'
1010
import { Theme, ThemeOptions } from './theme'
1111
import { segment } from './utils/segment'
12+
export type Config = UserConfig
1213

1314
const IS_VALID_UTILITY_NAME = /^[a-z][a-zA-Z0-9/%._-]*$/
1415

0 commit comments

Comments
 (0)