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 Generic Type on colors method #70

Closed
DeVoresyah opened this issue Jun 26, 2023 · 0 comments
Closed

Add Generic Type on colors method #70

DeVoresyah opened this issue Jun 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@DeVoresyah
Copy link
Member

Background

right now, colors method return either string or string[]. I found a case when using react-native-svg and want to use colors method for color props. I need to change the return type using as to make it fit with what color props are needed.

Problem

Screen Shot 2023-06-26 at 14 49 41

Temporary Solution

Screen Shot 2023-06-26 at 14 50 02

Solution

We need to add a generic type on colors method and use that generic type for the return type

@DeVoresyah DeVoresyah added the enhancement New feature or request label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant