上抛出了一个错误。错误是:
Property 'map' does not exist on type 'IObjectSchema | IObjectSchema[]'.问题是-我要么处理IObjectSchema元素,要么处理此类元素的数组。当我进入Array.isArray...时,我100%确定我得到了一个数组,因此我在数组上有了可用的.map函数。这
我想使用useState钩子将新的项推入到我的初始状态数组中,但是我得到了错误: TS2322类型号不能分配给类型'never‘。([...pageNumbers,i)带下划线 我的代码: const [pageNumbers, setPageNumbers] = useState([]);
let i