Skip to content

Commit fac9719

Browse files
committed
Merge branch 'release/2.7.0'
2 parents 1743843 + 022adcc commit fac9719

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-plugin-css-modules",
3-
"version": "2.5.0",
3+
"version": "2.7.0",
44
"main": "lib/index.js",
55
"author": "Brody McKee <[email protected]>",
66
"license": "MIT",

src/helpers/__tests__/__snapshots__/getDtsSnapshot.test.ts.snap

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Object {
1010
`;
1111

1212
exports[`utils / cssSnapshots with file 'empty.module.less' createExports should create an exports file 1`] = `
13-
"declare const classes: {
13+
"declare let classes: {
1414
1515
};
1616
export default classes;
@@ -21,7 +21,7 @@ exports[`utils / cssSnapshots with file 'empty.module.less' getClasses should re
2121

2222
exports[`utils / cssSnapshots with file 'empty.module.less' with a custom template should transform the generated dts 1`] = `
2323
"/* eslint-disable */
24-
declare const classes: {
24+
declare let classes: {
2525
2626
};
2727
export default classes;
@@ -31,7 +31,7 @@ export type AllClassNames = '';"
3131
`;
3232

3333
exports[`utils / cssSnapshots with file 'empty.module.sass' createExports should create an exports file 1`] = `
34-
"declare const classes: {
34+
"declare let classes: {
3535
3636
};
3737
export default classes;
@@ -42,7 +42,7 @@ exports[`utils / cssSnapshots with file 'empty.module.sass' getClasses should re
4242

4343
exports[`utils / cssSnapshots with file 'empty.module.sass' with a custom template should transform the generated dts 1`] = `
4444
"/* eslint-disable */
45-
declare const classes: {
45+
declare let classes: {
4646
4747
};
4848
export default classes;
@@ -52,7 +52,7 @@ export type AllClassNames = '';"
5252
`;
5353

5454
exports[`utils / cssSnapshots with file 'empty.module.scss' createExports should create an exports file 1`] = `
55-
"declare const classes: {
55+
"declare let classes: {
5656
5757
};
5858
export default classes;
@@ -63,7 +63,7 @@ exports[`utils / cssSnapshots with file 'empty.module.scss' getClasses should re
6363

6464
exports[`utils / cssSnapshots with file 'empty.module.scss' with a custom template should transform the generated dts 1`] = `
6565
"/* eslint-disable */
66-
declare const classes: {
66+
declare let classes: {
6767
6868
};
6969
export default classes;
@@ -73,7 +73,7 @@ export type AllClassNames = '';"
7373
`;
7474

7575
exports[`utils / cssSnapshots with file 'empty.module.styl' createExports should create an exports file 1`] = `
76-
"declare const classes: {
76+
"declare let classes: {
7777
7878
};
7979
export default classes;
@@ -84,7 +84,7 @@ exports[`utils / cssSnapshots with file 'empty.module.styl' getClasses should re
8484

8585
exports[`utils / cssSnapshots with file 'empty.module.styl' with a custom template should transform the generated dts 1`] = `
8686
"/* eslint-disable */
87-
declare const classes: {
87+
declare let classes: {
8888
8989
};
9090
export default classes;
@@ -94,7 +94,7 @@ export type AllClassNames = '';"
9494
`;
9595

9696
exports[`utils / cssSnapshots with file 'import.module.css' createExports should create an exports file 1`] = `
97-
"declare const classes: {
97+
"declare let classes: {
9898
'classA': string;
9999
'ClassB': string;
100100
'class-c': string;
@@ -129,7 +129,7 @@ Object {
129129

130130
exports[`utils / cssSnapshots with file 'import.module.css' with a custom template should transform the generated dts 1`] = `
131131
"/* eslint-disable */
132-
declare const classes: {
132+
declare let classes: {
133133
'classA': string;
134134
'ClassB': string;
135135
'class-c': string;
@@ -152,7 +152,7 @@ export type AllClassNames = 'classA' | 'ClassB' | 'class-c' | 'class_d' | 'paren
152152
`;
153153

154154
exports[`utils / cssSnapshots with file 'import.module.less' createExports should create an exports file 1`] = `
155-
"declare const classes: {
155+
"declare let classes: {
156156
'nested-class-parent': string;
157157
'child-class': string;
158158
'selector-blue': string;
@@ -185,7 +185,7 @@ Object {
185185

186186
exports[`utils / cssSnapshots with file 'import.module.less' with a custom template should transform the generated dts 1`] = `
187187
"/* eslint-disable */
188-
declare const classes: {
188+
declare let classes: {
189189
'nested-class-parent': string;
190190
'child-class': string;
191191
'selector-blue': string;
@@ -204,7 +204,7 @@ export type AllClassNames = 'nested-class-parent' | 'child-class' | 'selector-bl
204204
`;
205205

206206
exports[`utils / cssSnapshots with file 'import.module.styl' createExports should create an exports file 1`] = `
207-
"declare const classes: {
207+
"declare let classes: {
208208
'foo': string;
209209
'bar': string;
210210
'baz': string;
@@ -240,7 +240,7 @@ Object {
240240

241241
exports[`utils / cssSnapshots with file 'import.module.styl' with a custom template should transform the generated dts 1`] = `
242242
"/* eslint-disable */
243-
declare const classes: {
243+
declare let classes: {
244244
'foo': string;
245245
'bar': string;
246246
'baz': string;
@@ -262,7 +262,7 @@ export type AllClassNames = 'foo' | 'bar' | 'baz' | 'col-1' | 'col-2' | 'col-3'
262262
`;
263263

264264
exports[`utils / cssSnapshots with file 'test.module.css' createExports should create an exports file 1`] = `
265-
"declare const classes: {
265+
"declare let classes: {
266266
'classA': string;
267267
'ClassB': string;
268268
'class-c': string;
@@ -297,7 +297,7 @@ Object {
297297

298298
exports[`utils / cssSnapshots with file 'test.module.css' with a custom template should transform the generated dts 1`] = `
299299
"/* eslint-disable */
300-
declare const classes: {
300+
declare let classes: {
301301
'classA': string;
302302
'ClassB': string;
303303
'class-c': string;
@@ -320,7 +320,7 @@ export type AllClassNames = 'classA' | 'ClassB' | 'class-c' | 'class_d' | 'paren
320320
`;
321321

322322
exports[`utils / cssSnapshots with file 'test.module.less' createExports should create an exports file 1`] = `
323-
"declare const classes: {
323+
"declare let classes: {
324324
'nested-class-parent': string;
325325
'child-class': string;
326326
'selector-blue': string;
@@ -353,7 +353,7 @@ Object {
353353

354354
exports[`utils / cssSnapshots with file 'test.module.less' with a custom template should transform the generated dts 1`] = `
355355
"/* eslint-disable */
356-
declare const classes: {
356+
declare let classes: {
357357
'nested-class-parent': string;
358358
'child-class': string;
359359
'selector-blue': string;
@@ -372,7 +372,7 @@ export type AllClassNames = 'nested-class-parent' | 'child-class' | 'selector-bl
372372
`;
373373

374374
exports[`utils / cssSnapshots with file 'test.module.sass' createExports should create an exports file 1`] = `
375-
"declare const classes: {
375+
"declare let classes: {
376376
'local-class-inside-global': string;
377377
'local-class': string;
378378
'local-class-2': string;
@@ -425,7 +425,7 @@ Object {
425425

426426
exports[`utils / cssSnapshots with file 'test.module.sass' with a custom template should transform the generated dts 1`] = `
427427
"/* eslint-disable */
428-
declare const classes: {
428+
declare let classes: {
429429
'local-class-inside-global': string;
430430
'local-class': string;
431431
'local-class-2': string;
@@ -454,7 +454,7 @@ export type AllClassNames = 'local-class-inside-global' | 'local-class' | 'local
454454
`;
455455

456456
exports[`utils / cssSnapshots with file 'test.module.scss' createExports should create an exports file 1`] = `
457-
"declare const classes: {
457+
"declare let classes: {
458458
'local-class-inside-global': string;
459459
'local-class': string;
460460
'local-class-2': string;
@@ -507,7 +507,7 @@ Object {
507507

508508
exports[`utils / cssSnapshots with file 'test.module.scss' with a custom template should transform the generated dts 1`] = `
509509
"/* eslint-disable */
510-
declare const classes: {
510+
declare let classes: {
511511
'local-class-inside-global': string;
512512
'local-class': string;
513513
'local-class-2': string;
@@ -536,7 +536,7 @@ export type AllClassNames = 'local-class-inside-global' | 'local-class' | 'local
536536
`;
537537

538538
exports[`utils / cssSnapshots with file 'test.module.styl' createExports should create an exports file 1`] = `
539-
"declare const classes: {
539+
"declare let classes: {
540540
'foo': string;
541541
'bar': string;
542542
'baz': string;
@@ -572,7 +572,7 @@ Object {
572572

573573
exports[`utils / cssSnapshots with file 'test.module.styl' with a custom template should transform the generated dts 1`] = `
574574
"/* eslint-disable */
575-
declare const classes: {
575+
declare let classes: {
576576
'foo': string;
577577
'bar': string;
578578
'baz': string;

src/helpers/createExports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const NOT_CAMELCASE_REGEXP = /[\-_]/;
88

99
const classNameToProperty = (className: string) => `'${className}': string;`;
1010
const classNameToNamedExport = (className: string) =>
11-
`export const ${className}: string;`;
11+
`export let ${className}: string;`;
1212

1313
const flattenClassNames = (
1414
previousValue: string[] = [],
@@ -39,7 +39,7 @@ export const createExports = ({
3939
.map(classNameToNamedExport);
4040

4141
let dts = `\
42-
declare const classes: {
42+
declare let classes: {
4343
${processedClasses.map(classNameToProperty).join('\n ')}
4444
};
4545
export default classes;

0 commit comments

Comments
 (0)