Skip to content

Error for protected members using vue-property-decorator not accessible in virtual template file #1224

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

Closed
3 tasks done
yoyoys opened this issue Apr 24, 2019 · 3 comments · Fixed by #1243
Closed
3 tasks done

Comments

@yoyoys
Copy link

yoyoys commented Apr 24, 2019

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS
  • Vetur version: 0.19.0
  • VS Code version: 1.33.1

Problem

image (2)

Reproducible Case

Project created with vue-cli 3.6.3, TSLint, airbnb.

I've just set a data as protected, then vetur told me it's not accessible.

I think they're the same object, this issue cause protected means I can't see myself.
And all my class members will set to public, that's ridiculous.

@ktsn
Copy link
Member

ktsn commented Apr 24, 2019

This is because of how template diagnostics work. The component type and template diagnostics is separated under the hood. Unfortunately, I don't think we can solve this soon.

@ghost

This comment has been minimized.

@octref octref changed the title Wrong template accessible scope with 0.19.0 Error for protected members using vue-property-decorator not accessible in virtual template file Apr 24, 2019
@octref
Copy link
Member

octref commented Apr 24, 2019

@yoyoys Can you show the full message code?

@ktsn What do you think about we filter out that specific error code?

@pdmshrestha Your issue is something else.

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

Successfully merging a pull request may close this issue.

3 participants