Open mvelkCisco opened 2 months ago
These utilities could be cleaned up and documented better. Especially there's an edge case when passing a polymorphic component as a component prop of another polymorphic component basically disables the type checking silently.
component
Context and some initial refactoring in https://github.com/advthreat/incident-manager/pull/2870. Needs to be finished and moved here.
Consider adding type tests https://www.npmjs.com/package/@definitelytyped/dtslint
Sharing the workaround PR for reference which includes having to keep a .js file around for the polymorphic so it can pick up propTypes: https://github.com/cisco-sbg-ui/magna-react/pull/857
These utilities could be cleaned up and documented better. Especially there's an edge case when passing a polymorphic component as a
component
prop of another polymorphic component basically disables the type checking silently.Context and some initial refactoring in https://github.com/advthreat/incident-manager/pull/2870. Needs to be finished and moved here.
Consider adding type tests https://www.npmjs.com/package/@definitelytyped/dtslint