From c9274b4184528f1cfb250f9928a4d5bdbb25bb10 Mon Sep 17 00:00:00 2001 From: Andre Wiggins <459878+andrewiggins@users.noreply.github.com> Date: Sat, 3 Dec 2022 04:43:52 -0800 Subject: [PATCH] fix: add type for function localsConvention value (#11152) --- packages/vite/src/node/plugins/css.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index 0277a6594a3445..7761249bfb524a 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -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}`)