Skip to content

Commit 59b60e7

Browse files
committed
update types
1 parent 6ed74bc commit 59b60e7

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

index.d.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import type { Plugin, PluginBuild } from 'esbuild';
2-
import type { BundleOptions, CustomAtRules, TransformOptions } from 'lightningcss';
2+
import type {
3+
BundleOptions,
4+
CustomAtRules,
5+
TransformOptions,
6+
} from 'lightningcss';
37

4-
declare type EmitDtsConfig = Partial<Record<'.d.css.ts' | '.css.d.ts' | '*', string>>;
8+
declare type EmitDtsConfig = Partial<
9+
Record<'.d.css.ts' | '.css.d.ts' | '*', string>
10+
>;
511

612
declare interface BuildOptions
713
extends Partial<
@@ -96,14 +102,18 @@ declare interface BuildOptions
96102
* - **pascalCaseOnly**: `.some-class-name` ==> `SomeClassName`, the original class name will be removed from the locals
97103
* @default "camelCaseOnly"
98104
*/
99-
localsConvention?: 'camelCase' | 'pascalCase' | 'camelCaseOnly' | 'pascalCaseOnly';
100-
/**
105+
localsConvention?:
106+
| 'camelCase'
107+
| 'pascalCase'
108+
| 'camelCaseOnly'
109+
| 'pascalCaseOnly';
110+
/**
101111
* Features that should always be compiled, even when supported by targets.
102112
* @see https://lightningcss.dev/transpilation.html#feature-flags
103113
*/
104114
featuresInclude?: BundleOptions<CustomAtRules>['include'];
105115
/**
106-
* Features that should never be compiled, even when unsupported by targets.
116+
* Features that should never be compiled, even when unsupported by targets.
107117
* @see https://lightningcss.dev/transpilation.html#feature-flags
108118
*/
109119
featuresExclude?: BundleOptions<CustomAtRules>['exclude'];
@@ -153,8 +163,8 @@ declare namespace CssModulesPlugin {
153163
export interface Build extends PluginBuild {
154164
context: BuildContext;
155165
}
156-
}
157166

158-
export default CssModulesPlugin;
167+
export default CssModulesPlugin;
168+
}
159169

160170
export = CssModulesPlugin;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "esbuild-css-modules-plugin",
3-
"version": "3.1.3",
3+
"version": "3.1.4",
44
"description": "A esbuild plugin to bundle css modules into js(x)/ts(x), based on extremely fast [Lightning CSS](https://lightningcss.dev/)",
55
"main": "./index.cjs",
66
"module": "./index.js",

0 commit comments

Comments
 (0)