You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use TypeScript for the project and pass a function to NUpload's on-error prop that doesn't return anything. Then try to build the project.
Expected results (期望的结果)
The project builds without failing.
Actual results (实际的结果)
The build fails with the message Type 'void' is not assignable to type 'FileInfo | undefined'.
The documentation states that the on-error function does have a return type of UploadFileInfo | void but it is UploadFileInfo | undefined, causing an error on build.
Remarks (补充说明)
The text was updated successfully, but these errors were encountered:
TuSimple/naive-ui version (版本)
2.31.0
Vue version (Vue 版本)
3.2.37
Browser and its version (浏览器及其版本)
Chrome (103.0.5060.114)
System and its version (系统及其版本)
MacOS (12.4)
Node version (Node 版本)
Reappearance link (重现链接)
https://github.com/linkurzweg/vue3-webstorm-example/blob/main/src/components/Upload.vue
Reappearance steps (重现步骤)
Use TypeScript for the project and pass a function to NUpload's
on-error
prop that doesn't return anything. Then try to build the project.Expected results (期望的结果)
The project builds without failing.
Actual results (实际的结果)
The build fails with the message
Type 'void' is not assignable to type 'FileInfo | undefined'
.The documentation states that the
on-error
function does have a return type ofUploadFileInfo | void
but it isUploadFileInfo | undefined
, causing an error on build.Remarks (补充说明)
The text was updated successfully, but these errors were encountered: