-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
Description
Version
2.6.10
Reproduction link
https://jsfiddle.net/keegan_openbay/nhvemx32/ (be aware that JSFiddle does not show TypeScript compiler errors)
Steps to reproduce
- use TypeScript >= 3.6.1-beta (currently stable at 3.6.2)
- have at least one prop
- correctly type all your methods
- use a non-string
data
property in your component options
What is expected?
Normal behavior; the data
property is correctly typed and found on the instance.
What is actually happening?
Errors arise because:
- in
methods
, the data properties are not found on the component type. - in
watch
, the data properties are typedstring | WatchOptionsWithHandler<any> | WatchHandler<any>
. - in
computed
, the data properties are typed(() => any) | ComputedOptions<any>
.
jacekkarczmarczyk, gregoirechauvet, cassiebrooks, cappuc, KaelWD and 2 more