[英]error TS2740 Type 'DeepPartial<Quiz>[]' is missing the following properties from type 'Question': id, question, hasId, save, and 4 more
[英]TS2740 is missing the following properties from type, Typescript, NestJS
我有一個界面,用於詳細輸入值:
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)
謝謝大家!! 我有解決方案
const detailInput = {
vat: input.vat,
exportNoBill: input.exportNobill
} as DocumentDetailInput
和
detail: DocumentDetailInput
現在我不能只是從 DocumentDetailInput 接口中排除東西!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.