Skip to content

Property '$options' does not exist on type 'VueConstructor<Vue>'. #10776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zsluedem opened this issue Oct 29, 2019 · 3 comments
Open

Property '$options' does not exist on type 'VueConstructor<Vue>'. #10776

zsluedem opened this issue Oct 29, 2019 · 3 comments

Comments

@zsluedem
Copy link

Version

2.6.10

Reproduction link

https://jsfiddle.net/jafbudpk/3/#&togetherjs=HlrrSLGnsb

Steps to reproduce

import Vue, { PluginFunction } from 'vue';
interface PluginOptions {}

export const Plugin: PluginFunction<PluginOptions> = function Plugin(Vue, PluginOptions): void {
  Vue.mixin({
    created() {
      this.$options.socket = 1;
    }
  });
};

What is expected?

The $option should be already type right.

What is actually happening?

Property '$options' does not exist on type 'VueConstructor'.ts(2339)

@stuft2
Copy link

stuft2 commented Mar 10, 2020

Is there a reason that some public members of the Vue class are not included in the type definition? This is getting really messy for me as I'm having to create a vue-shim.d.ts that augments the VueConstructor type as a work around for this issue.

@heyakyra
Copy link

Umbrella ticket: #8721

@douglasg14b
Copy link

The umbrella issue doesn't appear to be covering the same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants