Skip to content

Optional chaining - #1041

Merged
Perryvw merged 6 commits into
masterfrom
optional-chaining
Jul 9, 2021
Merged

Optional chaining#1041
Perryvw merged 6 commits into
masterfrom
optional-chaining

Conversation

@Perryvw

@Perryvw Perryvw commented Jul 4, 2021

Copy link
Copy Markdown
Member

Added support for optional chaining.

I tried to come up with a good test suite but I feel like I might still be missing some stuff, feel free to suggest extra tests.

Also removed a stray .debug() I left in the module-resolution tests, as well as fixing an undiscovered quadratic (actually worse) complexity bug with ??.

@Perryvw
Perryvw requested review from lolleko and tomblind July 4, 2021 18:28
Comment thread test/unit/optionalChaining.spec.ts Outdated
Comment thread test/unit/optionalChaining.spec.ts
Comment thread src/transformation/visitors/binary-expression/index.ts Outdated
Comment thread src/transformation/visitors/binary-expression/index.ts Outdated
Comment thread test/unit/optionalChaining.spec.ts
Comment thread test/unit/optionalChaining.spec.ts
@Perryvw
Perryvw merged commit d79a207 into master Jul 9, 2021
@Perryvw Perryvw linked an issue Jul 9, 2021 that may be closed by this pull request
@Perryvw
Perryvw deleted the optional-chaining branch July 10, 2021 15:27
sanikoyes pushed a commit to sanikoyes/TypeScriptToLua that referenced this pull request Sep 24, 2021
* Optional chaining

* Added some more possibly undefined test cases

* Added extra test and fixed bug

* Removed double work from transformNullishCoalescingExpression

* fix prettier
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.

Optional Chaining support

2 participants