Skip to content

Design Meeting Notes, 1/21/2022 #47726

Closed
Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Destructuring and Narrowing

#47337

  • If you narrow with "a" in value when value is generic, and then grab a with value.a, it works, but doesn't with destructuring.
    • Inconsistent!
  • Sometimes it makes sense to get the base constraint in destructured valies instead of the generic, and sometimes it's best to keep the original type.
    • But threading the code to do that is difficult.
  • Lots of bug reports where people say "oh no, I wanted the deferred version" or "I want the base constrained person"
  • Seems like there are a well-understood set of cases that can be iterated on in the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design NotesNotes from our design meetings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions