question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

Edit on CodeSandbox

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. Screen Shot 2020-06-18 at 4 30 25 AM

But in rc-field-form/lib/interface.d.ts, RuleType doesn’t include “array” Screen Shot 2020-06-18 at 4 30 09 AM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zj9495commented, Dec 20, 2020

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

0reactions
NuoHuicommented, Sep 7, 2020
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found