Skip to content

Commit 908d491

Browse files
kepekmattcompiles
authored andcommitted
fix: Support @babel/plugin-transform-typescript (seek-oss#24)
BREAKING CHANGE: Template update
1 parent 88538d1 commit 908d491

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const LineDiff = require('line-diff');
66
const bannerMessage =
77
'// This file is automatically generated.\n// Please do not change this file!';
88

9-
const cssModuleExport = 'declare const cssExports: CssExports;\nexport = cssExports;\n';
9+
const cssModuleExport = 'export const cssExports: CssExports;\nexport default cssExports;\n';
1010

1111
const getNoDeclarationFileError = ({ filename }) =>
1212
new Error(

test/emit-declaration/__snapshots__/emit-declaration.test.js.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ interface CssExports {
99
'someClass': string;
1010
'validClass': string;
1111
}
12-
declare const cssExports: CssExports;
13-
export = cssExports;
12+
export const cssExports: CssExports;
13+
export default cssExports;
1414
"
1515
`;
1616

@@ -23,7 +23,7 @@ interface CssExports {
2323
'someClass': string;
2424
'validClass': string;
2525
}
26-
declare const cssExports: CssExports;
27-
export = cssExports;
26+
export const cssExports: CssExports;
27+
export default cssExports;
2828
"
2929
`;

test/emit-empty-declaration/__snapshots__/emit-empty-declaration.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`Can emit valid declaration without classes 1`] = `
66
interface CssExports {
77
88
}
9-
declare const cssExports: CssExports;
10-
export = cssExports;
9+
export const cssExports: CssExports;
10+
export default cssExports;
1111
"
1212
`;

test/verify-invalid-declaration/__snapshots__/verify-invalid-declaration.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ exports[`Can error on invalid declaration 1`] = `
1010
- 'classInTypeScriptFile': string;
1111
+ 'classInCssFile': string;
1212
}
13-
declare const cssExports: CssExports;
14-
export = cssExports;
13+
export const cssExports: CssExports;
14+
export default cssExports;
1515
1616
1717
"

test/verify-invalid-declaration/index.css.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ interface CssExports {
44
'classInBothFiles': string;
55
'classInTypeScriptFile': string;
66
}
7-
declare const cssExports: CssExports;
8-
export = cssExports;
7+
export const cssExports: CssExports;
8+
export default cssExports;

test/verify-valid-declaration/index.css.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ interface CssExports {
77
'underscored_classname': string;
88
'validClass': string;
99
}
10-
declare const cssExports: CssExports;
11-
export = cssExports;
10+
export const cssExports: CssExports;
11+
export default cssExports;

0 commit comments

Comments
 (0)