Skip to content

Commit

Permalink
Update test failure from merge conflict. (#38603)
Browse files Browse the repository at this point in the history
A test written on 12 Sep was merged on 24 Sep. In between, the Props
definition it used changed so that the new test was an error.

This PR just clones the original Props type and gives it a new name.
  • Loading branch information
sandersn committed Sep 25, 2019
1 parent 78d635d commit ad9de86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion types/react/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,13 @@ const ForwardingRefComponent = React.forwardRef((props: {}, ref: React.Ref<RefCo
return React.createElement(RefComponent, { ref });
});

const ForwardingRefComponentPropTypes: React.WeakValidationMap<Props> = {};
interface AttributeProps extends React.Attributes {
hello: string;
world?: string | null;
foo: number;
}

const ForwardingRefComponentPropTypes: React.WeakValidationMap<AttributeProps> = {};
ForwardingRefComponent.propTypes = ForwardingRefComponentPropTypes;

function RefCarryingComponent() {
Expand Down

0 comments on commit ad9de86

Please sign in to comment.