Skip to content

Use let instead of const #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/helpers/__tests__/__snapshots__/getDtsSnapshot.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Object {
`;

exports[`utils / cssSnapshots with file 'empty.module.less' createExports should create an exports file 1`] = `
"declare const classes: {
"declare let classes: {

};
export default classes;
Expand All @@ -21,7 +21,7 @@ exports[`utils / cssSnapshots with file 'empty.module.less' getClasses should re

exports[`utils / cssSnapshots with file 'empty.module.less' with a custom template should transform the generated dts 1`] = `
"/* eslint-disable */
declare const classes: {
declare let classes: {

};
export default classes;
Expand All @@ -31,7 +31,7 @@ export type AllClassNames = '';"
`;

exports[`utils / cssSnapshots with file 'empty.module.sass' createExports should create an exports file 1`] = `
"declare const classes: {
"declare let classes: {

};
export default classes;
Expand All @@ -42,7 +42,7 @@ exports[`utils / cssSnapshots with file 'empty.module.sass' getClasses should re

exports[`utils / cssSnapshots with file 'empty.module.sass' with a custom template should transform the generated dts 1`] = `
"/* eslint-disable */
declare const classes: {
declare let classes: {

};
export default classes;
Expand All @@ -52,7 +52,7 @@ export type AllClassNames = '';"
`;

exports[`utils / cssSnapshots with file 'empty.module.scss' createExports should create an exports file 1`] = `
"declare const classes: {
"declare let classes: {

};
export default classes;
Expand All @@ -63,7 +63,7 @@ exports[`utils / cssSnapshots with file 'empty.module.scss' getClasses should re

exports[`utils / cssSnapshots with file 'empty.module.scss' with a custom template should transform the generated dts 1`] = `
"/* eslint-disable */
declare const classes: {
declare let classes: {

};
export default classes;
Expand All @@ -73,7 +73,7 @@ export type AllClassNames = '';"
`;

exports[`utils / cssSnapshots with file 'empty.module.styl' createExports should create an exports file 1`] = `
"declare const classes: {
"declare let classes: {

};
export default classes;
Expand All @@ -84,7 +84,7 @@ exports[`utils / cssSnapshots with file 'empty.module.styl' getClasses should re

exports[`utils / cssSnapshots with file 'empty.module.styl' with a custom template should transform the generated dts 1`] = `
"/* eslint-disable */
declare const classes: {
declare let classes: {

};
export default classes;
Expand All @@ -94,7 +94,7 @@ export type AllClassNames = '';"
`;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

exports[`utils / cssSnapshots with file 'test.module.styl' with a custom template should transform the generated dts 1`] = `
"/* eslint-disable */
declare const classes: {
declare let classes: {
'foo': string;
'bar': string;
'baz': string;
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/createExports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const createExports = ({
.map(classNameToNamedExport);

let dts = `\
declare const classes: {
declare let classes: {
${processedClasses.map(classNameToProperty).join('\n ')}
};
export default classes;
Expand Down