Skip to content

Completions broken in setup function return object literal for vueΒ #43612

@yoyo930021

Description

@yoyo930021

Bug Report

πŸ”Ž Search Terms

completions return 'object literal shorthands'

πŸ•— Version & Regression Information

  • This changed between versions 4.2.0 and 4.2.3

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

import { defineComponent } from '@vue/runtime-core'

export default defineComponent({
  name: 'App',
  setup () {
    const waitingForAutocomplete = true;

    const a = {
      wait // get `waitingForAutocomplete`
    }

    return {
      wait // don't get any completion
    }
  }
})

πŸ™ Actual behavior

We can't get any completion for object literal shorthand in setup return.

πŸ™‚ Expected behavior

Like common object literal shorthand.

Ref: #41259 #41539
From: vuejs/vetur#2544

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions