There's a subtle difference between TS' question mark and union. The question mark means "this argument is optional", which can be different than "this argument can be undefined".
The following code is valid:
function foo1(value?: number) {}
foo1()
But the following code will raise a type error: function foo2(value: number | undefined) {}
foo2()
In practice, that rarely becomes problematic. But it's good to know the difference