Basically
bar: ?string
accepts a string, null or void:
foo("test");
foo(null);
foo()
While
bar?: string
Accepts only a string or void:
foo("test");
foo();
As passing null instead of a string is somewhat senseless, theres no real life difference between them.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…