mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-11 07:44:04 +08:00
23 lines
681 B
TypeScript
23 lines
681 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>(
|
|
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>
|
|
}
|
|
}
|