Update typings

The prop `fill` is marked as required in the propTypes for `CircularProgress` but is optional in the Typescript type declaration. This results in Typescript not complaining when leaving the prop empty, while propTypes generates the following warning during runtime: `Failed prop type: The prop 'fill' is marked as required in 'AnimatedCircularProgress', but its value is 'undefined'.`. The fix is to change the Typescript declaration for `fill` from optional to required.
This commit is contained in:
Stephen Ramthun 2021-01-27 22:14:35 +01:00 committed by GitHub
parent 1ff5559216
commit 0dc9b5efff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

15
index.d.ts vendored
View File

@ -24,6 +24,13 @@ declare module 'react-native-circular-progress' {
*/
width: number;
/**
* Current progress / fill
*
* @type {number}
*/
fill: number;
/**
* Thickness of background circle
*
@ -32,14 +39,6 @@ declare module 'react-native-circular-progress' {
*/
backgroundWidth?: number;
/**
* Current progress / fill
*
* @type {number}
* @default 0
*/
fill?: number;
/**
* Color of the progress line
*