RESSA
RESSA copied to clipboard
Optional chaining not supported
Apologies for keeping you busy ! These are very new so I fully understand if you don't support them :-
let vehicle = {
};
let vehicle1 = {
car: {
name: 'ABC',
speed: 90
}
};
console.log(vehicle.car?.name); // Undefined
console.log(vehicle.car?.speed); // Undefined
console.log(vehicle1.car?.name); // ABC
console.log(vehicle1.car?.speed); // 90
yields the following error :- UnexpectedToken(Position { line: 12, column: 25 }, "Expected
{,
[, or
(; found Punct(Period)")
The general goal is to support features that have made it to stage 3 in the proposal process. In a quick glance across the proposal stages, I wasn't able to find the ?
operator, do you know where the proposal is currently?
There is an issue on this repo about currently unimplemented stage 3 features that I try an keep up to date
It looks like these are Stage 4 now :- https://github.com/TC39/proposal-optional-chaining https://github.com/tc39/proposal-nullish-coalescing This article describes all the 'new' things in es2020: https://www.w3schools.com/js/js_2020.asp