代码如下:
XXX.specs.item.type === "array"
? XXXX
: [];
报错:Property 'item' does not exist on type 'stringDateType | numberDateType | arrDateType | structDateType'. Property 'item' does not exist on type 'stringDateType'.
XXX: {
specs:
| stringDateType
| numberDateType
| arrDateType
| structDateType
| booleanDateType;
type:
| "int"
| "int8"
| "int16"
| "int32"
| "int64"
| "bool" | "string"
| "float"
| "double"
| "array"
| "struct"
| "其他"
| unknown;
};
XXX.specs.item.type === "array"
? XXXX
: [];
报错:Property 'item' does not exist on type 'stringDateType | numberDateType | arrDateType | structDateType'. Property 'item' does not exist on type 'stringDateType'.
XXX: {
specs:
| stringDateType
| numberDateType
| arrDateType
| structDateType
| booleanDateType;
type:
| "int"
| "int8"
| "int16"
| "int32"
| "int64"
| "bool"
| "float"
| "double"
| "array"
| "struct"
| "其他"
| unknown;
};
