typescript defs missing `id` attribute for Box
See original GitHub issueTrying to do:
<Box
key={marker.points}
display="inline-block"
id={marker.label}
width={`${width}%`}
bg={filled ? '#959da5' : ''}
>
<div style={dotStyle} />
</Box
And it is complaining about id
:
Type '{ children: Element; key: number; display: string; id: string; width: string; bg: string; }' is not assignable to type 'IntrinsicAttributes & BoxProps & { children?: ReactNode; }'.
Property 'id' does not exist on type 'IntrinsicAttributes & BoxProps & { children?: ReactNode; }'.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
typescript defs missing `id` attribute for Box · Issue #540
My only concern with this approach is if there are any props which explicitly don't want to expose to pass along to the...
Read more >The property 'value' does not exist on value of type ...
Based on Tomasz Nurkiewiczs answer, the "problem" is that typescript is typesafe. :) So the document.getElementById() returns the type HTMLElement which ...
Read more >The starting point for learning TypeScript
Find TypeScript starter projects: from Angular to React or Node.js and CLIs.
Read more >typescript-cheatsheet - GitHub Pages
A set of TypeScript related notes used for quick reference. The cheatsheet contains references to types, classes, decorators, and many other TypeScript ......
Read more >Useful Patterns by Use Case - React TypeScript Cheatsheets
// Note the <T extends unknown> before the function definition. // You can't use just `<T>` as it will confuse the TSX parser...
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
There is an
Omit<T, K>
utility type, which could be used for (3). https://www.typescriptlang.org/docs/handbook/utility-types.html#omittkThanks y’all!