Add typescript typings for Icon names.
See original GitHub issueDescribe the feature
Big fan of this awesome library. This is a small suggestion.
If you give an icon an invalid name, you get an error telling you all of the available icon names:
<Button icon="some-inexistent-name"></Button>
// Invalid prop `name` of value `some-inexistent-name` supplied to `Icon`
It would be useful if the icon
prop had Typescript suggestions with the available names.
Also, in the error message, it would be useful to add a link to a website that has the available icon names.
Motivation
It’s hard to know which icon types are usable while coding. Also, the error message is long, so it slows the logs down a little.
Related Issues
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How To Create Custom Types in TypeScript - DigitalOcean
Though the basic types in TypeScript will cover many use cases, creating your own custom ... Add a double colon and then add...
Read more >React Native - expo/vector-icons typescript type definition for ...
I'm trying to find out the type definitions for the icon name of expo/vector-icons, since I am intending to use it for a...
Read more >Documentation - Symbols - TypeScript
Built-in symbols are used to represent internal language behaviors. Here is a list of well-known symbols: Symbol.hasInstance. A method that determines if a ......
Read more >@types/react-native-vector-icons - npm
TypeScript definitions for react-native-vector-icons. Latest version: 6.4.12, last published: 4 months ago.
Read more >Using 'Pick' in TypeScript to simplify Types and Interfaces
@Injectable({ providedIn: 'root', }) export class AuthService { constructor() {} async create({ name, email, password }: any) {...} async login ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nandorojo Could you please add a comment in this thread regarding the typing icon prop? https://github.com/callstack/react-native-paper/issues/1489 Then we could try to find a solution for that in 4.0
Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.