Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

setStyle, setFlex and setAccessibility receiving invalid types #1558

Closed
matheusribeirozup opened this issue May 12, 2021 · 0 comments
Closed
Labels
backend This issue directly affects structure and logic of Backend project DX Dev Experience: something that directly degrades our users (developers) experience with our product enhancement New feature or request

Comments

@matheusribeirozup
Copy link
Contributor

Use case

The extension functions setStyle, setFlex and setAccessibility erroneously accept to receive as parameter an instance of each respective class, being that it should receive only its attributes.

Invalid cases that do not result in a crash or warning but are wrongly accepted:

  • .setFlex { Flex() }
  • .setStyle { Style() }
  • .setAccessibility { Accessibility() }

Proposal

I suggest two solutions:

  • To start treating cases where the user can inform not only the parameters of the Style, Flex and Accessibility classes but also an instance of each class, or
  • Only accept the properties of each class as a parameter and, through an error or warning, prevent the receipt of an instance of Style, Flex or Accessibility.
@matheusribeirozup matheusribeirozup added enhancement New feature or request backend This issue directly affects structure and logic of Backend project DX Dev Experience: something that directly degrades our users (developers) experience with our product labels May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend This issue directly affects structure and logic of Backend project DX Dev Experience: something that directly degrades our users (developers) experience with our product enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants