Damans227 commented on pull request #17315:
URL: https://github.com/apache/superset/pull/17315#issuecomment-956941967
> @Damans227 looks like there's a couple lint issues here. I'd recommend
running `npm run type` locally to see the typescript errors, and also updating
the pr title according to the PR Lint error here
@etr2460 Looks like there is a type mismatch:
```
src/explore/components/controls/HiddenControl.tsx:29:31 - error TS2322: Type
'string | number | boolean | Function | any[] | Record<string, any>' is not
assignable to type 'string | number | readonly string[] | undefined'.
Type 'false' is not assignable to type 'string | number | readonly
string[] | undefined'.
29 return <Input type="hidden" value={props.value} />;
~~~~~
node_modules/@types/react/index.d.ts:2224:9
2224 value?: string | ReadonlyArray<string> | number | undefined;
~~~~~
The expected type comes from property 'value' which is declared here on
type 'IntrinsicAttributes & Pick<InputProps, "dir" | "form" | "slot" | "style"
| "title" | "pattern" | "id" | "children" | "prefixCls" | "className" | ... 281
more ... | "bordered"> & ... 4 more ... & { ...; }'
```
If I change the type of value in the interface to `value: 'string | number |
readonly string[] | undefined';` then there are no errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]