HerringtonDarkholme / av-ts

A modern, type-safe, idiomatic Vue binding library
MIT License
216 stars 11 forks source link

Something goes wired in v0.7.1 #47

Closed whitetrefoil closed 7 years ago

whitetrefoil commented 7 years ago
import { Component, Vue }  from 'av-ts'

@Component()
class Test extends Vue {

}

Above code works w/ v0.7.0. But w/ v0.7.1 it raise error:

Error:(3, 2) TS2345:Argument of type 'typeof Test' is not assignable to parameter of type 'VClass'. Property 'extend' is missing in type 'typeof Test'.

HerringtonDarkholme commented 7 years ago

hmmm, I cannot reproduce it. Would you like provide a minimal reproduction?

whitetrefoil commented 7 years ago

Try this one: https://github.com/whitetrefoil/vue-ts-arch/tree/sp/av-ts-071

yarn
npm run gulp build

My env:

whitetrefoil commented 7 years ago

FYI: I tried to modify the 1st line of av-ts/dist/index.d.ts to old version import Vue = require('vue'); and the error disappeared...

HerringtonDarkholme commented 7 years ago

Please use allowSyntheticDefaultImports.

It is recommended by new import style.

whitetrefoil commented 7 years ago

Yeah~ I just found that document~ Thx~