我不太理解下面的错误: Type 'Promise<void>' is missing the following properties from type 'InventoryModel[]': lengthTS2740 我有以下功能组件: import React, { useEffect, useState } from "react";
import { Grid, TextField } from/Models
我正在尝试创建一个react类装饰器,它向任何react组件添加一些道具,并返回装饰器中包含当前道具和额外道具的装饰组件。我能够找到一个常规typescript类装饰器的工作代码,可以在typescript的上找到。但是,这是针对泛型类的。它不包含任何react类型。下面是我想用React和Typescript实现的类似功能:@AddOtherProps
class BasicComponen