Skip to content

Data properties not found and/or incorrectly typed in TypeScript 3.6.2 #10455

Closed
@kjleitz

Description

@kjleitz

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 typed string | WatchOptionsWithHandler<any> | WatchHandler<any>.
  • in computed, the data properties are typed (() => any) | ComputedOptions<any>.

Screen Shot 2019-08-29 at 6 50 52 PM

Screen Shot 2019-08-29 at 7 00 23 PM

Screen Shot 2019-08-29 at 7 10 17 PM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions