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

Add Type for SVG Imports in Typescript #1353

Closed
wodka opened this issue Apr 20, 2020 · 6 comments
Closed

Add Type for SVG Imports in Typescript #1353

wodka opened this issue Apr 20, 2020 · 6 comments

Comments

@wodka
Copy link

wodka commented Apr 20, 2020

Feature Request

https://github.com/react-native-community/react-native-svg#use-with-svg-files suggests to import svg files.

Why it is needed

For good type suggestions a new type must be added to allow this

Possible implementation

declare module '*.svg' {
  import Svg from 'react-native-svg'

  const content: Svg;
  export default content;
}

Code sample

Please show how the new code could work, if doable

@stale
Copy link

stale bot commented Jun 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

@stale stale bot added the stale label Jun 19, 2020
@ajaysaini-sgvu
Copy link

+1

@stale stale bot removed the stale label Aug 21, 2020
@just-Bri
Copy link

Bumping this.

@bombillazo
Copy link

Bump!!! Please, this is breaking our linter 😄

@cuzbog
Copy link

cuzbog commented Jul 10, 2023

Any workaround for this?

@bohdanprog
Copy link
Member

Hello,
As I see, it was already implemented if you still have any suggestions feel free to open a new issue.
Thank you.

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

No branches or pull requests

6 participants