HerringtonDarkholme / av-ts

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

p({type: String}) doesn't work as expected #59

Closed icopp closed 7 years ago

icopp commented 7 years ago

For a simple example:

@Prop
value = p({
  type: String,
  default: ''
})

tempValueCopy: string = this.value

...results in an error:

'Type 'String' is not assignable to type 'string'.
  'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.'
HerringtonDarkholme commented 7 years ago

https://github.com/HerringtonDarkholme/av-ts/wiki/FAQ#4-var-num-number--ptype-number-does-not-work