-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 3.5.1
Search Terms: jsx, dash, props
Code
declare namespace JSX {
interface ElementAttributesProperty {
props: any;
}
}
class MyComponent {
props: {
foo?: string;
}
}
// OK
const el1 = <MyComponent foo="bar" />;
// OK, fooBar is incorrect prop
const el2 = <MyComponent fooBar="bar" />;
// Not OK, foo-bar is incorrect prop, but not reported
const el3 = <MyComponent foo-bar="bar" />;Expected behavior:
Expected error on el3.
Actual behavior:
No error on el3.
peter-leonov, jcemer, trotyl, ibilichenko, aaliakseyeu and 23 morebrainkim
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug