Error range for JSX components spans the whole compoenent · Issue #23116 · microsoft/TypeScript (original) (raw)
Missing attribute error highlights the whole component, which can be distracting, and does not help in pointing out the source of the problem. We should instead highlight the component name in these cases.
import React from "react";
export class MyComponent extends React.Component<{ abc: number }> { }
<MyComponent key="hi" AnotherProperty="ss" YetAnotherProperty={ { a: 0, b: "ss" } } />
Originally reported in https://twitter.com/keeskluskens/status/981168047204458501