expo / vector-icons

https://icons.expo.fyi
MIT License
650 stars 113 forks source link

Fix Icon.Button props TypeScript types #155

Closed wschurman closed 3 years ago

wschurman commented 3 years ago

Why

The types here are incomplete for the current version documented at https://docs.expo.io/guides/icons/, and need to be sync'ed with the ones for react-native-vector-icons: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-native-vector-icons/Icon.d.ts

Specifically, when using these in an app recently, I needed the backgroundColor prop on Ionicons.Button and needed to use a /* @ts-expect-error */.

How

Copy some defs from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-native-vector-icons/Icon.d.ts manually.

Test Plan

yarn tsc

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/expoio/vector-icons/ca1auq7fi
✅ Preview: https://vector-icons-git-wschurman-fix-ts-prop.expoio.now.sh