js模块导出行中的冒号和&语句是什么意思?

问题描述

在react native github中是这一行:

module.exports=((Animated: any) : (typeof AnimatedImplementation) & typeof Animated);

是什么意思? &和: 这些是类型提示还是什么?

解决方法

这些是https://flow.org/类型的注释。您可以通过带有@flow标记的标头注释来告诉文件使用Flow语法。