Skip to content

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

Open
@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

    Domain: Completion ListsThe issue relates to showing completion lists in an editorExperience EnhancementNoncontroversial enhancementsExperimentation NeededSomeone needs to try this out to see what happensSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions