Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ref and Memo options break rest props typing #440

Closed
katywings opened this issue Apr 26, 2020 · 1 comment
Closed

Ref and Memo options break rest props typing #440

katywings opened this issue Apr 26, 2020 · 1 comment
Labels

Comments

@katywings
Copy link
Contributor

🐛 Bug Report

Using svgr with the "--ref" option results in "Property does not exist in ..." typescript errors for rest-spread props:

propDoesNotExist

To Reproduce

  • Create a typescript environment (in my case I used codesandbox and locally nextjs)
  • Create svg components with svgr --ref
  • Make sure that the svg component is imported with types (allowJs enabled in tsconfig)
  • (Note: the error happens independent if the --typescript svgr option is set or not

Expected behavior

Rest spreaded props should be possible while using forwardRef

Link to repl or repo (highly encouraged)

Run npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard

## System:
 - OS: Linux 4.19 Manjaro Linux
 - CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
 - Memory: 5.68 GB / 15.39 GB
 - Container: Yes
 - Shell: 5.0.16 - /bin/bash
## Binaries:
 - Node: 12.15.0 - /usr/local/bin/node
 - Yarn: 1.16.0 - ~/.npm-global/bin/yarn
 - npm: 6.13.4 - /usr/local/bin/npm
@gregberge
Copy link
Owner

Fixed in #441, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants