gpt4 book ai didi

flowtype - 流: Cannot build a typed interface for this module

转载 作者:行者123 更新时间:2023-12-05 02:06:44 24 4
gpt4 key购买 nike

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

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ packages/gestalt/src/Typeahead.js:272:9

Cannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot
determine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this
expression. [signature-verification-failure]

269│ Typeahead.propTypes = {
270│ id: PropTypes.string,
271│ onChange: PropTypes.func,
272│ data: PropTypes.arrayOf(
273│ PropTypes.exact({
274│ label: PropTypes.string.isRequired,
275│ value: PropTypes.string.isRequired,
276│ })
277│ ),
278│ placeholder: PropTypes.string,
279│ size: PropTypes.oneOf(['md', 'lg']),
280│ searchField: PropTypes.string,


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ packages/gestalt/src/Typeahead.js:279:9

Cannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot
determine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this
expression. [signature-verification-failure]

276│ })
277│ ),
278│ placeholder: PropTypes.string,
279│ size: PropTypes.oneOf(['md', 'lg']),
280│ searchField: PropTypes.string,
281│ onBlur: PropTypes.func,
282│ onFocus: PropTypes.func,


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ packages/gestalt/src/Typeahead.js:284:16

Cannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot
determine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this
expression. [signature-verification-failure]

281│ onBlur: PropTypes.func,
282│ onFocus: PropTypes.func,
283│ onSelect: PropTypes.func,
284│ defaultItem: PropTypes.exact({
285│ label: PropTypes.string.isRequired,
286│ value: PropTypes.string.isRequired,
287│ }),
288│ noResultText: PropTypes.string,
289│ };
290│


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ packages/gestalt/src/TypeaheadInputField.js:193:16

Cannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot
determine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this
expression. [signature-verification-failure]

190│ };
191│ forwardRefInputField.displayName = 'InputField';
192│
193│ export default React.forwardRef<Props, HTMLInputElement>(forwardRefInputField);
194│


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ packages/gestalt/src/TypeaheadOption.js:79:11

Cannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot
determine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this
expression. [signature-verification-failure]

76│ Option.displayName = 'Option';
77│
78│ Option.propTypes = {
79│ option: PropTypes.exact({
80│ label: PropTypes.string.isRequired,
81│ value: PropTypes.string.isRequired,
82│ }),
83│ selected: PropTypes.exact({
84│ label: PropTypes.string.isRequired,
85│ value: PropTypes.string.isRequired,


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ packages/gestalt/src/TypeaheadOption.js:83:13

Cannot build a typed interface for this module. You should annotate the exports of this module with types. Cannot
determine the type of this call expression. Please provide an annotation, e.g., by adding a type cast around this
expression. [signature-verification-failure]

80│ label: PropTypes.string.isRequired,
81│ value: PropTypes.string.isRequired,
82│ }),
83│ selected: PropTypes.exact({
84│ label: PropTypes.string.isRequired,
85│ value: PropTypes.string.isRequired,
86│ }),
87│ searchField: PropTypes.string,
88│ handleSelect: PropTypes.func,
89│ };



Found 6 errors

最佳答案

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

你可以在这里了解更多 What is the "types first" Flow architecture?

关于flowtype - 流: Cannot build a typed interface for this module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62527015/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com