It's the nullish coalescing operator that has been proposed for ecmascript and has been implemented in Typescript. You can read more in the Github issue for its implementation or the JavaScript documentation on MDN.

The gist of it is that

const dealType = currentDealType ?? originalDealType;

is equivalent to:

const dealType = currentDealType !== null && currentDealType !== void 0 ? currentDealType : originalDealType;

Or in words: if currentDealType is null or undefined use originalDealType otherwise use currentDealType

Answer from Titian Cernicova-Dragomir on Stack Overflow
๐ŸŒ
Medium
medium.com โ€บ @teamcode20233 โ€บ understanding-double-question-mark-operator-in-typescript-be869f210fe6
Understanding Double Question Mark Operator (??) in TypeScript | by Teamcode | Medium
July 3, 2023 - When we use the double question mark operator (??) to assign a default value to displayName, it checks if name is null or undefined. Since name is null, the default value โ€œGuestโ€ is assigned to displayName.
๐ŸŒ
Tim Mousk
timmousk.com โ€บ blog โ€บ typescript-double-question-mark
How To Use The Double Question Mark Operator In TypeScript? โ€“ Tim Mouskhelichvili
March 6, 2023 - The double question mark operator or nullish coalescing operator helps assign a default value to a null or undefined TypeScript variable.
๐ŸŒ
Thrive My Way
thrivemyway.com โ€บ home โ€บ javascript libraries โ€บ typescript โ€“ double question marks (??) explained
TypeScript - Double Question Marks (??) Explained - Learn Digital Marketing
January 5, 2023 - In TypeScript, the double question mark (??) is known as the nullish coalescing operator. It is used to provide a default value for a variable that may be
๐ŸŒ
Becomebetterprogrammer
becomebetterprogrammer.com โ€บ typescript-double-question-marks
TypeScript | Double Question Marks (??) - What it Means - Become A Better Programmer
April 25, 2022 - The double question marks (??) are also called nullish coalescing operators in TypeScript. They allow to use of a default value set on the right side of the operator in case the initial value from the left side of the operator is null or undefined.
๐ŸŒ
Eran Stiller
eranstiller.com โ€บ javascript-double-question-marks
What Is the JavaScript Double Question Marks (??) Operator?
September 24, 2023 - It helps handle null or undefined values seamlessly, assigning default values and preventing unexpected behaviors. Coupled with the optional chaining operator, it ensures safe access to object properties.
๐ŸŒ
Reddit
reddit.com โ€บ r/javascript โ€บ new nullish coalescing (?? double question mark ) operator in typescript & javascript
r/javascript on Reddit: New Nullish Coalescing (?? Double question mark ) Operator in Typescript & Javascript
May 9, 2019 - Yes, typescript counts. Please keep self promotion to a minimum/reasonable level. ... It's very recent, it was moved to stage 4 (Finished) 5 months ago https://github.com/tc39/proposal-nullish-coalescing ... Wow, I just typed in this search on duckduckgo "double question mark typescript" after ...
Find elsewhere
๐ŸŒ
DEV Community
dev.to โ€บ danywalls โ€บ simplify-your-typescript-code-with-optional-chaining-and-nullish-coalescing-37on
Simplify Your Typescript Code with Optional Chaining and Nullish Coalescing - DEV Community
May 23, 2023 - The double question mark (??) checks if the left-hand side value is nullish (null or undefined) and provides the right-hand side value as the default if needed. Nullish coalescing ensures that we always have a valid jersey number, even if it's ...
๐ŸŒ
Angular.love
angular.love โ€บ double-question-marks-typescript-3-7-nullish-coalescing
Double Question Marks TypeScript 3.7 - Nullish Coalescing
That pretty much wraps up the explanation on this handy little operator. We already had a similar one in ||, but this one takes care of the few edge cases highlighted here, when valid values overlap the conditions covered by the || operator.
๐ŸŒ
Lightly-dev
lightly-dev.com โ€บ blog โ€บ typescript-double-question-mark
What is Double Question Mark (??) in TypeScript? - Lightly
In TypeScript, the double question mark (??) is the nullish coalescing operator used to provide a default value when a variable is null or undefined.
๐ŸŒ
xjavascript
xjavascript.com โ€บ blog โ€บ typescript-double-question-mark
Understanding the TypeScript Double Question Mark (`??`) Operator โ€” xjavascript.com
One of the useful features introduced in TypeScript (and ECMAScript 2020) is the nullish coalescing operator, represented by the double question mark (`??`). This operator provides a concise way to handle null or undefined values, offering more ...
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Operators โ€บ Nullish_coalescing
Nullish coalescing operator (??) - JavaScript | MDN
The nullish coalescing (??) operator is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.
๐ŸŒ
DEV Community
dev.to โ€บ emilossola โ€บ understanding-double-question-mark-operator-in-typescript-10a1
Understanding Double Question Mark Operator (??) in TypeScript - DEV Community
July 3, 2023 - The syntax for using the double question mark operator is value1 ?? value2, where value1 is the expression to be evaluated and value2 is the fallback value to be used if value1 is null or undefined.
๐ŸŒ
Sonar Community
community.sonarsource.com โ€บ sonarqube cloud
TypeScript 3.7 Nullish Coalescing Operator `? ?` (Double question marks) - SonarQube Cloud - Sonar Community
April 22, 2020 - Weโ€™re seeing errors during the Azure DevOps Code Analysis step on TypeScript files. Example error: ##[error]ERROR: Failed to parse file [filename removed] at line 126: Expression expected. Looking at the file/line number, our code shows: this.lapsedServicers = response ?? new PagedResponse(); It seems the SonarCloud analyizer is getting tripped up on the new ?? nullish coaleascing operator which was added in TypeScript 3.7 โ€“ https://github.com/microsoft/TypeScript/pull/32883 Do we know whe...
๐ŸŒ
SkillReactor Blog
skillreactor.io โ€บ home โ€บ double question mark javascript operator explained
Double Question Mark JavaScript Operator Explained - SkillReactor Blog
July 8, 2024 - Using the double question mark operator, the variable displayName is set to โ€œGuestโ€ as the default value since name is nullish. This ensures that the application can gracefully handle the absence of a valid name without causing any unforeseen errors or bugs.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ how-the-question-mark-works-in-javascript
How the Question Mark (?) Operator Works in JavaScript
February 3, 2021 - Instead of the logical OR (||) operator, you can use double question marks (??), or Nullish Coalescing.
๐ŸŒ
Webdevtutor
webdevtutor.net โ€บ blog โ€บ typescript-syntax-double-question-mark
Mastering TypeScript Syntax: The Double Question Mark Trick
The double question mark operator works by checking if the left-hand operand is null or undefined before attempting to access its property or method.
๐ŸŒ
TypeScript
typescriptlang.org โ€บ docs โ€บ handbook โ€บ release-notes โ€บ typescript-3-7.html
TypeScript: Documentation - TypeScript 3.7
You might find yourself using ?. to replace a lot of code that performs repetitive nullish checks using the && operator.