Skip to content

Commit 05e6ebc

Browse files
Gerard Delmàsgdelmas
Gerard Delmàs
authored andcommitted
update typed-css-modules
1 parent 2586a42 commit 05e6ebc

File tree

5 files changed

+155
-259
lines changed

5 files changed

+155
-259
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"chalk": "^2.4.1",
4444
"css-modules-loader-core": "^1.1.0",
4545
"glob": "^7.1.3",
46-
"typed-css-modules": "^0.3.7"
46+
"typed-css-modules": "^0.4.2"
4747
},
4848
"engines": {
4949
"node": ">= 8"

src/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ interface DtsCreator {
2323

2424
interface DtsContent {
2525
readonly outputFilePath: string;
26-
readonly messageList: ReadonlyArray<string>;
2726
writeFile(): Promise<this>;
2827
}
2928

@@ -44,13 +43,6 @@ async function writeFile(dtsCreator: DtsCreator, cssFile: string): Promise<void>
4443
// clears cache so that watch mode generates update-to-date typing.
4544
const content = await dtsCreator.create(cssFile, undefined, true);
4645
await content.writeFile();
47-
if (content.messageList.length > 0) {
48-
console.warn(chalk.yellow(`[Warn] ${cssFile}`));
49-
for (const message of content.messageList) {
50-
console.warn(chalk.yellow(`[Warn] ${message}`));
51-
}
52-
throw new Error(`Failed to generate typing for ${cssFile}`);
53-
}
5446
}
5547

5648
async function generateTypingIfNecessary(dtsCreator: DtsCreator, cssFile: string): Promise<void> {
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
export const foo: string;
1+
declare const styles: {
2+
readonly "foo": string;
3+
};
4+
export = styles;
5+
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
export const foo: string;
1+
declare const styles: {
2+
readonly "foo": string;
3+
};
4+
export = styles;
5+

0 commit comments

Comments
 (0)