Skip to content

Type assertion using as not compiled properly in pug templates #122

@Jevon617

Description

@Jevon617

Related plugins

Describe the bug

Look this way

Reproduction

https://github.com/qnp/vue3-pug-template-ts-assertion-bug

Steps to reproduce

  1. Clone the repository.
  2. Run yarn then yarn dev
  3. Open the app URL in your browser
  4. You see a blank page and an error in the console:
Uncaught SyntaxError: Unexpected identifier 'as' (at App.vue?vue&type=template&lang.js:5:63)

System Info

System:
    OS: macOS 12.5.1
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
    Memory: 22.93 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    Yarn: 1.7.0 - /usr/local/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox: 109.0
    Firefox Developer Edition: 71.0
    Firefox Nightly: 76.0a1
    Safari: 15.6.1
  npmPackages:
    vue: ^3.2.45 => 3.2.45

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions