Files
devhub/@types/react-native/index.d.ts
Bruno Lemos fae0152226 Experiment migrating all Animated to react-spring
Not good. Super slow because there is too many animated components, need to optimize that.

Lots of warnings on console like this: [Violation] 'requestAnimationFrame' handler took 1296ms

 #68
2019-01-12 05:59:59 -02:00

23 lines
690 B
TypeScript

export * from 'react-native'
declare module 'react-native' {
export namespace Animated {
export type AnimatedComponent<
T extends React.ComponentClass
> = (T extends React.ComponentClass<infer P>
? React.ComponentClass<P>
: React.ComponentClass) & {
getNode(): InstanceType<T>
}
export function createAnimatedComponent<
T extends React.ComponentClass<any, any>
>(component: T): AnimatedComponent<T>
export const View: AnimatedComponent<typeof View>
export const Image: AnimatedComponent<typeof Image>
export const Text: AnimatedComponent<typeof Text>
export const ScrollView: AnimatedComponent<typeof ScrollView>
}
}