mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-09 01:25:01 +00:00
Fix type exports and enable isolatedModules setting to catch it in tsc (#2197)
This is the same issue as the one I fixed last year in #1874 To prevent this from occurring again, I enabled the `isolatedModules` Typescript option which will warn when you export non-value identifiers without using `export type`, which will break transpilation processes what work on a per-file basis. You can find a [more detailed explanation in Typescript's doc](https://www.typescriptlang.org/tsconfig#isolatedModules)
This commit is contained in:
+12
-9
@@ -141,15 +141,6 @@ export {
|
|||||||
camelCase,
|
camelCase,
|
||||||
err,
|
err,
|
||||||
fetchText,
|
fetchText,
|
||||||
JsxAST,
|
|
||||||
Middleware,
|
|
||||||
Styles,
|
|
||||||
UriProps,
|
|
||||||
UriState,
|
|
||||||
XmlAST,
|
|
||||||
XmlProps,
|
|
||||||
XmlState,
|
|
||||||
AstProps,
|
|
||||||
Shape,
|
Shape,
|
||||||
RNSVGMarker,
|
RNSVGMarker,
|
||||||
RNSVGMask,
|
RNSVGMask,
|
||||||
@@ -175,4 +166,16 @@ export {
|
|||||||
RNSVGForeignObject,
|
RNSVGForeignObject,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type {
|
||||||
|
JsxAST,
|
||||||
|
Middleware,
|
||||||
|
Styles,
|
||||||
|
UriProps,
|
||||||
|
UriState,
|
||||||
|
XmlAST,
|
||||||
|
XmlProps,
|
||||||
|
XmlState,
|
||||||
|
AstProps,
|
||||||
|
};
|
||||||
|
|
||||||
export default Svg;
|
export default Svg;
|
||||||
|
|||||||
+3
-2
@@ -4,7 +4,7 @@
|
|||||||
"declaration": true,
|
"declaration": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"react-native-svg": ["./src"],
|
"react-native-svg": ["./src"],
|
||||||
"react-native-svg/css": ["./src/css/index.tsx"],
|
"react-native-svg/css": ["./src/css/index.tsx"]
|
||||||
},
|
},
|
||||||
"preserveSymlinks": true,
|
"preserveSymlinks": true,
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
@@ -17,7 +17,8 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user