-
-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(transformer/nullish-coalescing-operator): handles nullish coales…
…cing expression in the FormalParamter (#4975) ### What I did in this PR 1. Replace `self.clone_identifier_reference` with `ctx.clone_identifier.reference` 2. Remove the usage of `ast.copy` 3. Handle below example correctly ### Example ```js // Input var foo = object.foo ?? "default"; // Output var _object$foo; var foo = (_object$foo = object.foo) !== null && _object$foo !== void 0 ? _object$foo : "default"; ```
- Loading branch information
Showing
2 changed files
with
137 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters