-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Add a FlagAny problem can be solved by flags, except for the problem of having too many flagsAny problem can be solved by flags, except for the problem of having too many flagsWorking 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 21 morebrainkim
Metadata
Metadata
Assignees
Labels
Add a FlagAny problem can be solved by flags, except for the problem of having too many flagsAny problem can be solved by flags, except for the problem of having too many flagsWorking as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug