Subscribe on changes!

Cannot find name 'SubmitEvent'

avatar
Dec 25th 2021

Version

3.2.26

Reproduction link

sfc.vuejs.org/

Steps to reproduce

1.use typescript 2.declare a variable of type SubmitEvent

What is expected?

no errors

What is actually happening?

tell me cannot find name 'SubmitEvent',but I can find it in lib.dom.d.ts

avatar
Dec 25th 2021

Can't reproduce. Maybe you should provide a runnable repo.

avatar
Dec 25th 2021

I create a new project for testing. Created by CLI(version:4.5.15) with vue3 and typescript. Add a function name of doAction in App.vue. Here is the repo link vue-test. And this is my screenshot. test

avatar
Dec 25th 2021

@caozhong1996

avatar
Dec 25th 2021

The SubmitEvent interface was added in version 4.4, the version of vue-cli's tsc is 4.1😅 impicture_20211225_143729 impicture_20211225_143812

avatar
Dec 25th 2021

thanks @caozhong1996