Using lottie-react-native in your TypeScript app
The lottie-react-native
library includes types, so LottieView
components can be easily integrated with TypeScript applications. These types are defined in the file found in the lottie-react-native/src/js/index.d.ts
(type definition file) path inside the library's code. They are also accessible in the library's repository through https://github.com/lottie-react-native/lottie-react-native/blob/master/src/js/index.d.ts.
Besides the definition of the props and methods applicable to LottieView
, this file includes types for the following objects:
AnimationObject
: Types for the Lottie JSON file when it gets translated to a JavaScript objectColorFilter
: Types for the filters that can be applied to change colors in the animationTextFilterIOS
: Types for the filters that can be applied to change fonts on iOS devicesTextFilterAndroid
: Types for the filters that can be applied to change fonts on Android devices...