RuleType "type" doesn't include "array"
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
Project Too Large to isolate
What is expected?
Setting rule of type “array” for tag select component should work successfully. (Typescript project)
What is actually happening?
Setting property rule with value “array” for tag select components fails because it’s not declared in the RuleType
type.
Environment | Info |
---|---|
antd | 4.3.4 |
React | 16.13.1 |
System | MacOS Mojave 10.14.6 |
Browser | Chrome |
Possible values of rule as defined by async-validator
includes the “array” prop as expected.
But in rc-field-form/lib/interface.d.ts
, RuleType doesn’t include “array”
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Array type using Array<T> is forbidden - Stack Overflow
Yes, that is the behavior that the array-type rule enforces, when it is set to "array" : One of the following arguments must...
Read more >array-type | typescript-eslint
TypeScript provides two equivalent ways to define an array type: T[] and Array<T> . The two styles are functionally equivalent.
Read more >Topic #8: Arrays and Typing Rules Readings and References ...
Arrays are objects! They... » Must be instantiated with new unless immediately initialized. » Can contain Object references or primitive types.
Read more >TypeScript Array Contains | Examples with Rules ... - eduCBA
If the receiver object of the method indexOf call has includes a method, with both having the same parameters, it has a suggestion...
Read more >Documentation - Everyday Types - TypeScript
To specify the type of an array like [1, 2, 3] , you can use the syntax number[] ... Even if you don't...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
array type is already defined here https://github.com/react-component/field-form/blob/master/src/interface.ts#L81 should we close this issue?@afc163
sorry, @gwuah 。 https://github.com/react-component/field-form/blob/master/src/interface.ts#L70。 You can provide a demo?