Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork680
Fix no-ref-as-operand and allow lint when ref as right operator#2273
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for this PR. <script setup lang="ts">import {ref,Ref }from'vue'const refValue1:Ref<number>=ref(0)const maybeRefValue:Ref<number>|null=getMaybeRef()const refValue2=maybeRefValue||refValue1console.log(refValue2.value)</script> I think we should keep track of how the result of the expression is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
grindpride commentedSep 24, 2024
@ota-meshi@lakb248 constrefValue1:Ref<number>=ref(0)constmaybeRefValue:Ref<number>|null=getMaybeRef()constrefValue2=maybeRefValue||refValue1 But errors with such case use are often encountered constrefValue1:Ref<number>=ref(0)if(refValue1){//incorrect condition} |
fix#2271