Skip to content
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

"Property <property> is private and only accessible within class <classname>" error message should not be present #1303

Closed
mathmul opened this issue May 13, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@mathmul
Copy link

mathmul commented May 13, 2022

If there's something wrong with this code, please let me know. ATM I believe there is no mistake in this code, so I don't think Volar should report any errors from static analysis.

Code

<template>
  <Loader :widthPx="40" :heightPx="40" :show="isLoading" color="black" />
</template>

<script lang="ts">
import '@/assets/css/style.css';
import Vue from 'vue';
import { Component } from 'vue-property-decorator';
import Loader from "../components/Loader.vue";

@Component({
  components: {
    Loader,
  },
  filters: {
  },
})
export default class OrderView extends Vue {
  private isLoading = false;
}
</script>

Code image with underlined error and red component

image

Image of error message

image

NOTE

I'm using Vue 2, and have added the necessary lines in both package.json as well tsconfig.json. I also disabled Vetur.

@maroon1
Copy link

maroon1 commented May 13, 2022

@mathmul use public instead of private

@johnsoncodehk
Copy link
Member

Duplicate of #997

@johnsoncodehk johnsoncodehk marked this as a duplicate of #997 May 15, 2022
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants