Incorrect type definitions for Select interface
See original GitHub issueExpected Behavior
The latest version should be consumable from a TS project. The property definitions for the Select component should be correct:
...
disabledKey?: string | ((...args: any[]) => any);
...
Actual Behavior
When using grommet components TypeScript throws an error:
/node_modules/grommet/components/Select/index.d.ts
Type error: Type expected. TS1110
9 | closeOnChange?: boolean;
10 | disabled?: boolean | number | string | object[];
> 11 | disabledKey?: string | (...args: any[]) => any;
| ^
12 | dropAlign?: {top?: "top" | "bottom",bottom?: "top" | "bottom",right?: "left" | "right",left?: "left" | "right"};
13 | dropTarget?: object;
14 | focusIndicator?: boolean;
URL, screen shot, or Codepen exhibiting the issue
In the official TypeScript playground
Steps to Reproduce
- create-react-app
- add any tsconfig.json
- run the application
Your Environment
- Grommet version: 2.1.1
- Browser Name and version: any
- Operating System and version (desktop or mobile): desktop/Windows 10
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Typescript incorrect type inference when class implements ...
In order to do this I need to create some complex interfaces and then for my classes (I use classes in order not...
Read more >Incorrect error message when incorrectly implementing interface
It is normal to set a interface type to a concrete class that implements the interface, and there should never be an error...
Read more >Handbook - Interfaces - TypeScript
In TypeScript, interfaces fill the role of naming these types, and are a powerful way of defining contracts within your code as well...
Read more >TypeScript: type vs interface - DEV Community
Let's figure out what the difference between types and interfaces once ... interface ISelectableControl extends Control { select(): void; } ...
Read more >Surviving the TypeScript Ecosystem — Part 4 - Medium
Now we can remove our incorrect module definition for lodash (delete the contents, but keep the file, in “modules.d.ts”). import * as lodash...
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 FreeTop 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
Top GitHub Comments
We can release a bug fix soon. let me target friday since there are other minor fixes that can be included.
hey, i am just a happy contributor to grommet 😃 this is more of a question to the maintainers cc @alansouzati @ericsoderberghp @ShimiSun