Is it (`?:`) typescript ternary operator
You can use ?? operator!
const test: string = null;
console.log(test ?? 'none');
This will print 'none' because test is null. If there is a value for test, it will print that. You can try that here playground typescript
The ?
operator indicate that the property can be nullable
/ optional. It just means that the compilator will not throw an error if you do not implement this property in your implementation.