What Is the Meaning of the Question Mark and Exclamation Mark in TypeScript
转自:巧用ES系列4: TypeScript中的问号 ? 与感叹号 ! 是什么意思?
作者: e2tox
最近在利用空余时间结合 Ant Design Pro
学习 React
,在 ADP
中看到了这样的代码 actionRef.current?.reloadAndRest?.();
, 好奇问号的作用,经网友提示这是 TypeScript
的写法,请原谅我作为一个运维不会 TypeScript
,只能网上查了。