Skip to content

Commit

Permalink
fix: add type for function localsConvention value (#11152)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewiggins authored Dec 3, 2022
1 parent 75dbca2 commit c9274b4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,16 @@ export interface CSSModulesOptions {
/**
* default: undefined
*/
localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'
localsConvention?:
| 'camelCase'
| 'camelCaseOnly'
| 'dashes'
| 'dashesOnly'
| ((
originalClassName: string,
generatedClassName: string,
inputFile: string
) => string)
}

const cssModuleRE = new RegExp(`\\.module${CSS_LANGS_RE.source}`)
Expand Down

0 comments on commit c9274b4

Please sign in to comment.