以下面代码为例: ```js import { useState } from 'react'; const App = () => { const [count, setCount] = useState(0); const addCount = () => { setCount((c: number) => c + '1'); }; return ( Add Count {count} ); }; export default App; ``` 类型编译成功,没有抛出错误