我有一个界面,用于输入详细信息:
input DocumentDetailInput {
vat: Float!
isSaleWithPrescription: Boolean!
valueCountRound: Float!
paymentType: String!
exportNoBill: Boolean!
}
然后,我只想添加2个值:
detail: {
vat: input.vat,
exportNoBill: input.exportNobill
},
错误:
is missing the following properties from type 'DocumentDetail': valueCountRound, isSaleWithPrescription, paymentType.ts(2740)
答案 0 :(得分:0)
谢谢大家! 我有解决方法
const detailInput = {
vat: input.vat,
exportNoBill: input.exportNobill
} as DocumentDetailInput
和
detail: DocumentDetailInput
现在我不能仅仅从DocumentDetailInput接口中排除内容!