Skip to content
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

Add reference for two optional chain SyntaxErrors #34676

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

Josh-Cena
Copy link
Member

Part of mdn/mdn#505

@Josh-Cena Josh-Cena requested a review from a team as a code owner July 6, 2024 17:54
@Josh-Cena Josh-Cena requested review from teoli2003 and removed request for a team July 6, 2024 17:54
@github-actions github-actions bot added Content:JS JavaScript docs size/m [PR only] 51-500 LoC changed labels Jul 6, 2024
new Intl.DateTimeFormat().resolvedOptions?.();
```

Note that there's no needs to use `?.` on the `new` expression itself: `new a()?.b`, because `new` is guaranteed to produce a non-nullish object value.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Note that there's no needs to use `?.` on the `new` expression itself: `new a()?.b`, because `new` is guaranteed to produce a non-nullish object value.
Note that there's no need to use `?.` on the `new` expression itself: `new a()?.b`, because `new` is guaranteed to produce a non-nullish object value.

@sideshowbarker sideshowbarker merged commit 7ca1d16 into mdn:main Jul 10, 2024
7 checks passed
@sideshowbarker
Copy link
Member

whoops, sorry — fat-finger merged this before committing that typo fix

@Josh-Cena Josh-Cena deleted the invalid-optional branch July 10, 2024 02:52
evelinabe pushed a commit to evelinabe/mdn-content that referenced this pull request Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants