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

Keep generic defaults for method types #113

Open
Tracked by #57
elycruz opened this issue Jun 1, 2024 · 0 comments
Open
Tracked by #57

Keep generic defaults for method types #113

elycruz opened this issue Jun 1, 2024 · 0 comments
Assignees
Labels
enhancement groomed Ticket has been groomed for development. tech-debt

Comments

@elycruz
Copy link
Member

elycruz commented Jun 1, 2024

According to Ts Generic Parameter Defaults doc there doesn't seem to be any inherent performance/flexibility downsides to set defaults for method generic types (where it makes sense).

For now, will keep generics defaults on method types to ensure maximum flexibility of changes for Fjl-v2.0.

Acceptance Criteria

  • Keep generic defaults, where they make sense, for method types:

Keep the defaults for:

  • Method "type" declarations - Ensures the [method] types stay flexible.
  • For methods that take multiple generics and have one or more of those generics take one the defined generics as a generic (think 'map' fn operation, etc.), in these cases it makes sense to have defaults as to make the methods easier to use.

Reference:

https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-parameter-defaults

@elycruz elycruz mentioned this issue Jun 1, 2024
39 tasks
@elycruz elycruz self-assigned this Jun 1, 2024
@elycruz elycruz changed the title Remove generic defaults for method types. Figure out if we should have generic defaults for method types or not Jun 1, 2024
@elycruz elycruz added groomed Ticket has been groomed for development. enhancement tech-debt and removed needs-grooming labels Jun 1, 2024
@elycruz elycruz changed the title Figure out if we should have generic defaults for method types or not Keep generic defaults for method types Jun 1, 2024
@github-project-automation github-project-automation bot moved this to To do in Fjl v2.0 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement groomed Ticket has been groomed for development. tech-debt
Projects
Status: To do
Development

No branches or pull requests

1 participant