请允许我帮助我了解这里发生的情况吗?
type A = { propA: string };
type B = { propB: number }
type U = A | B;
class Model {}
class SingleModel extends Model {
constructor(input: U) {
super();
}
}
class MultiModel extends Model {
constructor(input: U[]) {
super();
}
}
type sheetType = new (input: U | U[]) => Model;
const config: { sheet: sheetType }[] = [
{ sheet: MultiModel },
{ sheet: SingleModel },
];
这里正出现错误:TS:2322 on sheet
propp in config
这里有什么错误?