Skip to content

Commit 361204f

Browse files
authored
fix(app-tools): SVG default export type (#3688)
1 parent 6b9d90a commit 361204f

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.changeset/small-scissors-help.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@modern-js/app-tools': patch
3+
---
4+
5+
fix(app-tools): SVG default export type
6+
7+
fix(app-tools): 修复 SVG 默认导出的类型错误

packages/solutions/app-tools/lib/types.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ declare module '*.svg' {
5353
React.SVGProps<SVGSVGElement>
5454
>;
5555

56-
const src: string;
57-
export default src;
56+
/**
57+
* The default export type depends on the svgDefaultExport config,
58+
* it can be a string or a ReactComponent
59+
* */
60+
const content: any;
61+
export default content;
5862
}
5963

6064
declare module '*.bmp?inline' {
@@ -99,12 +103,8 @@ declare module '*.svg?inline' {
99103
React.SVGProps<SVGSVGElement>
100104
>;
101105

102-
/**
103-
* The default export type depends on the svgDefaultExport config,
104-
* it can be a string or a ReactComponent
105-
* */
106-
const content: any;
107-
export default content;
106+
const src: string;
107+
export default src;
108108
}
109109

110110
declare module '*.bmp?url' {

0 commit comments

Comments
 (0)