Setting "Date" type as props will infer to string in the setup function
Version
3.0.2
Reproduction link
https://codesandbox.io/s/laughing-galois-gh0q4
Steps to reproduce
define props
{
props: {
date: Date
},
setup(props) {
// string type
props.date
}
What is expected?
props.date should be Date type
What is actually happening?
props.date is string type
Hi @Zcating , that's strange, I get the right result in your Reproduction link:
And even I create a project with vue-cli, the type of date is still Date
.
Environment Info:
System:
OS: Windows 10 10.0.19041
CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Binaries:
Node: 12.4.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 87.0.4280.88