Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Address prop-types feedback #1679

Merged
merged 4 commits into from Nov 23, 2022
Merged

chore: Address prop-types feedback #1679

merged 4 commits into from Nov 23, 2022

Conversation

ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Nov 23, 2022

For #1619 (comment)

Background

  • Address feedback

Change List

  • Rename PropDef to PropValidator
  • Add JSDoc
  • Clean up variable naming

type: string;
value: any;
max?: number;
min?: number;
private?: boolean;
validate?(value: any, propDef: PropDef): boolean;
validate?(value: any, propDef: PropValidator): boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
validate?(value: any, propDef: PropValidator): boolean;
validate?(value: any, propType: PropType): boolean;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original propType isn't saved so it may not be available.

I moved the validation code into the prop-types file which I think makes things a lot clearer.

I think that is sufficient amount of improvements for this round

@ibgreen ibgreen merged commit 84e9535 into master Nov 23, 2022
@ibgreen ibgreen deleted the ib/prop-types branch November 23, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants