I have this line in my code:
this.type = options.type == null ? MessageType.Success : options.type;
I am wondering if there is any syntax in TypeScript that makes such a thing shorter. Just because it is used a lot.
Is it something like this?
this.type = options.type ?? MessageType.Success;
I've already seen that, but I don't know what it means.