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