react-native-progress icon indicating copy to clipboard operation
react-native-progress copied to clipboard

Direction prop is missing from CircleSnail in declarations

Open bayoremit opened this issue 6 years ago • 1 comments

Index.d.ts is missing the direction prop for CircleSnail. Copy/Pasting this (below) from CircleProps should fix this. This is assuming this prop is not being deprecated as its still supported in the actual src

    /**
     * Direction of the circle `clockwise` or `counter-clockwise`.
     *
     * @type {('clockwise' | 'counter-clockwise')}
     * @memberof CirclePropTypes
     * @default clockwise
     */
    direction?: 'clockwise' | 'counter-clockwise';

Thanks!

bayoremit avatar Jun 19 '19 22:06 bayoremit

@bayoremit, as a workaround you can create custom declaration file (i prefer to use src/declaration.d.ts) and extend original props:

declare module 'react-native-progress' {
  import {
    CircleSnailPropTypes as RNPCircleSnailPropTypes
  } from 'react-native-progress';
  export interface CircleSnailPropTypes extends RNPCircleSnailPropTypes {
    /**
     * Direction of the circle `clockwise` or `counter-clockwise`.
     *
     * @type {('clockwise' | 'counter-clockwise')}
     * @memberof CirclePropTypes
     * @default clockwise
     */
    direction?: 'clockwise' | 'counter-clockwise';
  }
}

semenovDL avatar Apr 23 '20 12:04 semenovDL