React-Native with TypeScript breaks on typecheck #465#488
React-Native with TypeScript breaks on typecheck #465#488gregberge merged 4 commits intogregberge:masterfrom
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/gregberge/svgr/468u6w8fe |
|
By looking into Travis output and reducing the test down to |
|
@Ztarbox thanks, could you please remove the change in the |
I reset my changes of |
|
👋 @gregberge , When you can merge this PR, please? Any expectation! |
Summary
To fix #465 I updated the type annotations for react-native.
I also found to support the eslint rule @typescript-eslint/explicit-function-return-type we would need to add the return type if the typescript flag is present. But I have no idea how to implement that.
Test plan
I didn't get it with jest. It gave me (w/o changes) so much errors and deprecated snapshots. I lost sight.
Also I tried to just add to cli/src/index.test.js to 'should support various args', but jest didn't run it.
So I did manual tests:
svgr --native --typescript ../../../__fixtures__/simple/file.svg --silentnode svgr --native ../../../__fixtures__/simple/file.svg --silentnode svgr --native --typescript --ref ../../../__fixtures__/simple/file.svg --silent