在使用vue-cli 3.0 初始化一個(gè)支持typescript的項(xiàng)目時(shí),在phpstorm 中,以下語(yǔ)句的 !: 處會(huì)被編輯器報(bào)錯(cuò):expecting newline or semicolon使用npm run lint 沒(méi)有錯(cuò)誤這是初始化的項(xiàng)目,沒(méi)有做任何改動(dòng),確定是編輯器的配置問(wèn)題。編輯器無(wú)法解析typescript 的嘆號(hào)語(yǔ)法import { Component, Prop, Vue } from 'vue-property-decorator';@Componentexport default class HelloWorld extends Vue { @Prop() private msg!: string; // 報(bào)錯(cuò)的地方 !:}
vue-cli 3.0 新建項(xiàng)目在phpstorm 對(duì)typescript 嘆號(hào)的語(yǔ)法解析錯(cuò)誤
慕標(biāo)琳琳
2018-09-08 11:24:41