Skip to content

Auto complete custom element tags in TSX not working with hyphen in name #28905

@Cammisuli

Description

@Cammisuli

When using tsx to develop components for custom elements (web components), auto complete does not show element names that have a - in it's name.

I'm using https://stenciljs.com/ to create these components, and custom element names are added to an extended InstrinsicElements interface. Which looks like this:

interface StencilIntrinsicElements {
    'app-home': Components.AppHomeAttributes;
    'app-profile': Components.AppProfileAttributes;
    'app-root': Components.AppRootAttributes;
    'app-tester': Components.AppTesterAttributes;
    'tester2': Components.Tester2Attributes;
  }
  • VSCode Version:
    Version: 1.29.1 (system setup)
    Commit: bc24f98b5f70467bc689abf41cc5550ca637088e
    Date: 2018-11-15T19:13:36.375Z
    Electron: 2.0.12
    Chrome: 61.0.3163.100
    Node.js: 8.9.3
    V8: 6.1.534.41
    Architecture: x64

  • OS: Windows 10

Steps to Reproduce:
Repo here - https://github.com/Cammisuli/tsx-completion-bug

Preview of issue discussed:

  • Not working
    auto-complete-tsx-hyphen

  • Working
    auto-complete-tsx

After either element is added, hovering over it shows the proper type of the element.

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorDomain: JSX/TSXRelates to the JSX parser and emitter

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions