Skip to content

Conversation

zth
Copy link
Member

@zth zth commented Jan 25, 2023

Closes #714

cc @cknitt

@zth zth requested a review from cristianoc January 25, 2023 18:58
else ""

type completionMode = Pattern | Expression
type completionMode = Pattern of Completable.patternMode option | Expression
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if we can get rid of the option here by having

type patternMode = Default | Destructuring

or something like that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this affect destructuring only, or also explicit switches?

@zth
Copy link
Member Author

zth commented Jan 26, 2023

Right now it's configured to only affect let destructures.

@zth zth merged commit 303ffbf into master Jan 26, 2023
@zth zth deleted the special-case-opt-fields-in-destructuring branch January 26, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ? when destructuring for optional fields

3 participants