流程:无法为此模块构建类型化接口

Bat*_*man 5 flowtype

当我运行流程时,我收到这些错误,但完全不确定原因:

\n
Error \xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88 packages/gestalt/src/Typeahead.js:272:9\n\nCannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot\ndetermine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this\nexpression. [signature-verification-failure]\n\n     269\xe2\x94\x82 Typeahead.propTypes = {\n     270\xe2\x94\x82   id: PropTypes.string,\n     271\xe2\x94\x82   onChange: PropTypes.func,\n     272\xe2\x94\x82   data: PropTypes.arrayOf(\n     273\xe2\x94\x82     PropTypes.exact({\n     274\xe2\x94\x82       label: PropTypes.string.isRequired,\n     275\xe2\x94\x82       value: PropTypes.string.isRequired,\n     276\xe2\x94\x82     })\n     277\xe2\x94\x82   ),\n     278\xe2\x94\x82   placeholder: PropTypes.string,\n     279\xe2\x94\x82   size: PropTypes.oneOf(['md', 'lg']),\n     280\xe2\x94\x82   searchField: PropTypes.string,\n\n\nError \xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88 packages/gestalt/src/Typeahead.js:279:9\n\nCannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot\ndetermine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this\nexpression. [signature-verification-failure]\n\n     276\xe2\x94\x82     })\n     277\xe2\x94\x82   ),\n     278\xe2\x94\x82   placeholder: PropTypes.string,\n     279\xe2\x94\x82   size: PropTypes.oneOf(['md', 'lg']),\n     280\xe2\x94\x82   searchField: PropTypes.string,\n     281\xe2\x94\x82   onBlur: PropTypes.func,\n     282\xe2\x94\x82   onFocus: PropTypes.func,\n\n\nError \xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88 packages/gestalt/src/Typeahead.js:284:16\n\nCannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot\ndetermine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this\nexpression. [signature-verification-failure]\n\n     281\xe2\x94\x82   onBlur: PropTypes.func,\n     282\xe2\x94\x82   onFocus: PropTypes.func,\n     283\xe2\x94\x82   onSelect: PropTypes.func,\n     284\xe2\x94\x82   defaultItem: PropTypes.exact({\n     285\xe2\x94\x82     label: PropTypes.string.isRequired,\n     286\xe2\x94\x82     value: PropTypes.string.isRequired,\n     287\xe2\x94\x82   }),\n     288\xe2\x94\x82   noResultText: PropTypes.string,\n     289\xe2\x94\x82 };\n     290\xe2\x94\x82\n\n\nError \xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88 packages/gestalt/src/TypeaheadInputField.js:193:16\n\nCannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot\ndetermine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this\nexpression. [signature-verification-failure]\n\n     190\xe2\x94\x82 };\n     191\xe2\x94\x82 forwardRefInputField.displayName = 'InputField';\n     192\xe2\x94\x82\n     193\xe2\x94\x82 export default React.forwardRef<Props, HTMLInputElement>(forwardRefInputField);\n     194\xe2\x94\x82\n\n\nError \xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88 packages/gestalt/src/TypeaheadOption.js:79:11\n\nCannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot\ndetermine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this\nexpression. [signature-verification-failure]\n\n     76\xe2\x94\x82 Option.displayName = 'Option';\n     77\xe2\x94\x82\n     78\xe2\x94\x82 Option.propTypes = {\n     79\xe2\x94\x82   option: PropTypes.exact({\n     80\xe2\x94\x82     label: PropTypes.string.isRequired,\n     81\xe2\x94\x82     value: PropTypes.string.isRequired,\n     82\xe2\x94\x82   }),\n     83\xe2\x94\x82   selected: PropTypes.exact({\n     84\xe2\x94\x82     label: PropTypes.string.isRequired,\n     85\xe2\x94\x82     value: PropTypes.string.isRequired,\n\n\nError \xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88\xe2\x94\x88 packages/gestalt/src/TypeaheadOption.js:83:13\n\nCannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot\ndetermine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this\nexpression. [signature-verification-failure]\n\n     80\xe2\x94\x82     label: PropTypes.string.isRequired,\n     81\xe2\x94\x82     value: PropTypes.string.isRequired,\n     82\xe2\x94\x82   }),\n     83\xe2\x94\x82   selected: PropTypes.exact({\n     84\xe2\x94\x82     label: PropTypes.string.isRequired,\n     85\xe2\x94\x82     value: PropTypes.string.isRequired,\n     86\xe2\x94\x82   }),\n     87\xe2\x94\x82   searchField: PropTypes.string,\n     88\xe2\x94\x82   handleSelect: PropTypes.func,\n     89\xe2\x94\x82 };\n\n\n\nFound 6 errors\n
Run Code Online (Sandbox Code Playgroud)\n

Bri*_*hen 7

这是因为您启用了类型优先架构,这意味着在导出模块边界之前必须显式键入它。

您可以在这里了解更多信息 什么是“类型优先”的 Flow 架构?