Skip to content

Commit

Permalink
Use single-line syntax for private types comments (#8420)
Browse files Browse the repository at this point in the history
This prevents the comments from appearing in editors
  • Loading branch information
bradlc authored May 25, 2022
1 parent 33dff03 commit 22f9dc8
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions types/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,26 @@ type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues

// DarkMode related config
type DarkModeConfig =
/** Use the `media` query strategy. */
// Use the `media` query strategy.
| 'media'
/** Use the `class` stategy, which requires a `.dark` class on the `html`. */
// Use the `class` stategy, which requires a `.dark` class on the `html`.
| 'class'
/** Use the `class` stategy with a custom class instead of `.dark`. */
// Use the `class` stategy with a custom class instead of `.dark`.
| ['class', string]

type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>

// Theme related config
interface ThemeConfig {
/** Responsiveness */
// Responsiveness
screens: ResolvableTo<ScreensConfig>

/** Reusable base configs */
// Reusable base configs
colors: ResolvableTo<RecursiveKeyValuePair>
spacing: ResolvableTo<KeyValuePair>

/** Components */
// Components
container: ResolvableTo<
Partial<{
screens: ScreensConfig
Expand All @@ -92,7 +92,7 @@ interface ThemeConfig {
}>
>

/** Utilities */
// Utilities
inset: ThemeConfig['spacing']
zIndex: ResolvableTo<KeyValuePair>
order: ResolvableTo<KeyValuePair>
Expand Down Expand Up @@ -215,7 +215,7 @@ interface ThemeConfig {
willChange: ResolvableTo<KeyValuePair>
content: ResolvableTo<KeyValuePair>

/** Custom */
// Custom
[key: string]: any
}

Expand All @@ -240,15 +240,15 @@ type ValueType =
| 'relative-size'
| 'shadow'
export interface PluginAPI {
/** for registering new static utility styles */
// for registering new static utility styles
addUtilities(
utilities: RecursiveKeyValuePair | RecursiveKeyValuePair[],
options?: Partial<{
respectPrefix: boolean
respectImportant: boolean
}>
): void
/** for registering new dynamic utility styles */
// for registering new dynamic utility styles
matchUtilities<T>(
utilities: KeyValuePair<string, (value: T) => RecursiveKeyValuePair>,
options?: Partial<{
Expand All @@ -259,15 +259,15 @@ export interface PluginAPI {
supportsNegativeValues: boolean
}>
): void
/** for registering new static component styles */
// for registering new static component styles
addComponents(
components: RecursiveKeyValuePair | RecursiveKeyValuePair[],
options?: Partial<{
respectPrefix: boolean
respectImportant: boolean
}>
): void
/** for registering new dynamic component styles */
// for registering new dynamic component styles
matchComponents<T>(
components: KeyValuePair<string, (value: T) => RecursiveKeyValuePair>,
options?: Partial<{
Expand All @@ -278,20 +278,20 @@ export interface PluginAPI {
supportsNegativeValues: boolean
}>
): void
/** for registering new base styles */
// for registering new base styles
addBase(base: RecursiveKeyValuePair | RecursiveKeyValuePair[]): void
/** for registering custom variants */
// for registering custom variants
addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
/** for looking up values in the user’s theme configuration */
// for looking up values in the user’s theme configuration
theme: <TDefaultValue = Config['theme']>(
path?: string,
defaultValue?: TDefaultValue
) => TDefaultValue
/** for looking up values in the user’s Tailwind configuration */
// for looking up values in the user’s Tailwind configuration
config: <TDefaultValue = Config>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue
/** for checking if a core plugin is enabled */
// for checking if a core plugin is enabled
corePlugins(path: string): boolean
/** for manually escaping strings meant to be used in class names */
// for manually escaping strings meant to be used in class names
e: (className: string) => string
}
export type PluginCreator = (api: PluginAPI) => void
Expand All @@ -318,7 +318,7 @@ interface OptionalConfig {
theme: Partial<ThemeConfig & { extend: Partial<ThemeConfig> }>
corePlugins: Partial<CorePluginsConfig>
plugins: Partial<PluginsConfig>
/** Custom */
// Custom
[key: string]: any
}

Expand Down

0 comments on commit 22f9dc8

Please sign in to comment.