Skip to content

Parsing error: '}' expected at #4443

Closed
Closed
@equicy

Description

@equicy

Version

3.9.0

Environment info

{
  "name": "demo",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "svg": "vsvg -s ./src/icons/svg -t ./src/icons/components --ext ts --es6",
    "test:e2e": "vue-cli-service test:e2e",
    "test:unit": "vue-cli-service test:unit",
    "eslint": "eslint src --ext .ts"
  },
  "dependencies": {
    "@babel/cli": "^7.5.5",
    "@types/lodash": "^4.14.136",
    "@types/qs": "^6.5.3",
    "core-js": "^2.6.5",
    "element-ui": "^2.10.1",
    "nprogress": "^0.2.0",
    "register-service-worker": "^1.6.2",
    "sass-loader": "^7.1.0",
    "vue": "^2.6.10",
    "vue-class-component": "^7.0.2",
    "vue-property-decorator": "^8.1.0",
    "vue-router": "^3.0.3",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "@babel/preset-typescript": "^7.3.3",
    "@types/chai": "^4.1.0",
    "@types/js-cookie": "^2.2.2",
    "@types/mocha": "^5.2.4",
    "@types/nprogress": "^0.2.0",
    "@vue/cli-plugin-babel": "^3.9.0",
    "@vue/cli-plugin-e2e-cypress": "^3.9.0",
    "@vue/cli-plugin-eslint": "^3.5.0",
    "@vue/cli-plugin-pwa": "^3.9.0",
    "@vue/cli-plugin-typescript": "^3.9.0",
    "@vue/cli-plugin-unit-mocha": "^3.9.0",
    "@vue/cli-service": "^3.9.0",
    "@vue/eslint-config-standard": "^4.0.0",
    "@vue/eslint-config-typescript": "^4.0.0",
    "@vue/test-utils": "1.0.0-beta.29",
    "axios": "^0.19.0",
    "babel-eslint": "^10.0.1",
    "chai": "^4.1.2",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "js-cookie": "^2.2.0",
    "lint-staged": "^8.1.5",
    "sass": "^1.18.0",
    "sass-loader": "^7.1.0",
    "typescript": "^3.4.3",
    "vue-svgicon": "^3.2.6",
    "vue-template-compiler": "^2.6.10",
    "vuex-module-decorators": "^0.9.9"
  },
  "gitHooks": {
    "pre-commit": "lint-staged"
  },
  "lint-staged": {
    "*.{js,vue}": [
      "vue-cli-service lint",
      "git add"
    ]
  }
}

Steps to reproduce

Parsing error: '}' expected at
用vuecli3.0搭建的项目用在ts中

private handleAdd (): void {
this.type = '添加'
const upDateTenant = this.$refs.upDateTenant // 会在const前面提示Parsing error: '}' expected at
upDateTenant.popShow()
}

What is expected?

Parsing error: '}' expected at
用vuecli3.0搭建的项目用在ts中

private handleAdd (): void {
this.type = '添加'
const upDateTenant = this.$refs.upDateTenant // 会在const前面提示Parsing error: '}' expected at
upDateTenant.popShow()
}

What is actually happening?

Parsing error: '}' expected at
用vuecli3.0搭建的项目用在ts中

private handleAdd (): void {
this.type = '添加'
const upDateTenant = this.$refs.upDateTenant // 会在const前面提示Parsing error: '}' expected at
upDateTenant.popShow()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue is missing a minimal runnable reproduction, provided by the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions