johnsoncodehk / vue-tsc

vue-tsc --noEmit && vite build
https://www.npmjs.com/package/vue-tsc
MIT License
241 stars 6 forks source link

TS2322 when checking vue pug templates #14

Closed TSmulkys closed 3 years ago

TSmulkys commented 3 years ago

Hi. Then i use href or src attributes with pug template TS2322 error appears (with html templates works fine) Error appears only with vue-tsc 0.0.21 and above

Template example

<template lang="pug">
div
  a(href="#") Link text
  //- Or
  img(src="path/to/asset")
</template>

Error after run vue-tsc --noEmit

 error TS2322: Type 'true' is not assignable to type 'string | undefined'.
johnsoncodehk commented 3 years ago

Will check this, thanks for your report!

johnsoncodehk commented 3 years ago

Fixed in 0.0.23.