Closed vTrip closed 4 years ago
@vTrip
declare module 'react-native-spinkit' {
import React from 'react';
export type SpinnerType =
| 'CircleFlip'
| 'Bounce'
| 'Wave'
| 'WanderingCubes'
| 'Pulse'
| 'ChasingDots'
| 'ThreeBounce'
| 'Circle'
| '9CubeGrid'
| 'WordPress'
| 'FadingCircle'
| 'FadingCircleAlt'
| 'Arc'
| 'ArcAlt'
| 'Plane';
export type SpinnerProps = {
isVisible: boolean;
color?: string;
size?: number;
type?: SpinnerType;
};
const Spinner: React.ComponentType<SpinnerProps>;
export default Spinner;
}
While waiting for typescript support, you can do the following:
.d.ts
file. You can name it anything you want.@vTrip It looks like isVisible
is also optional - see: https://github.com/maxs15/react-native-spinkit/blob/5c08bdb546cc6d54769b5f19e9a129f857c75be6/index.js#L41
But thanks! Just what I needed.
Is it possible to have typescript definitions for this library?