Skip to content

Design Meeting Notes, 12/8/2023 #56717

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

Closed
DanielRosenwasser opened this issue Dec 9, 2023 · 0 comments
Closed

Design Meeting Notes, 12/8/2023 #56717

DanielRosenwasser opened this issue Dec 9, 2023 · 0 comments
Labels
Design Notes Notes from our design meetings

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Dec 9, 2023

Defining a type predicate breaks inheritance for methods with mapped types

#56133

  • Types fail to relate to each other because the apparent type is used.
  • Last time, suggestion was to infer between mapped types before inferring from apparent types.
  • PR at Infer between generic mapped types before inferring from apparent type #56640 does this, but could cause issues where inferring apparent types would have been better than from the mapped type.
  • Specific example of a homomorphic mapped type inferring from a mapped type where the constraint type is array-like.
  • Do we feel like this is too breaky?
    • Can find ways to ensure that these types infer appropriately based on if the constraint is array-like.
    • There are questions about if the constructed example should even have been allowed.
  • Probably will go ahead with currently-implemented behavior in Infer between generic mapped types before inferring from apparent type #56640

Parentheses Affecting Conditional Type Distributivity

#56271

  • Always said you can stop distributivity in [square brackets].
  • type MapNumbers<T> = [T] extends [number] ? ... : ...
  • Some weirdnesses around TypeScript doing the same with parentheses.
  • It shouldn't, right?
    • Probably
  • Parentheses shouldn't affect semantics.
@DanielRosenwasser DanielRosenwasser added the Design Notes Notes from our design meetings label Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Notes Notes from our design meetings
Projects
None yet
Development

No branches or pull requests

2 participants