Skip to content

completion list doesn't suggest 'const' in type assertion #29658

Closed

Description

TypeScript Version: 3.4.0-dev.20190131

Search Terms:

Code

1 as con/**/

Expected behavior:

Completion list should contain const

Actual behavior:

Completion list doesn't contain const.

In VSCode if the completion list is open, it automatically uses the first entry when typing certain characters like comma or semicolon. That's annoying as it replaces const with ConstantSourceNode or something like that.

Playground Link:

Related Issues:

Activity

  1. added
    Domain: LS: Completion Lists
    Bug
    on Jan 31, 2019
  2. Sammons commented on Feb 3, 2019

    @Sammons

    I don't see why const should be in the list? 1 as const; isn't really valid in normal typescript code is it?

  3. ajafff commented on Feb 3, 2019

    @ajafff
    ContributorAuthor

    Ben Sammons (@Sammons) that feature was merged a few days ago and is already in the the nightly release. It will ship officially with the next stable release.

  4. Sammons commented on Feb 4, 2019

    @Sammons

    Klaus Meinhardt (@ajafff) thanks for explaining, sorry for the rookie interjection

  5. tanhauhau commented on Feb 20, 2019

    @tanhauhau
    Contributor

    can i work on this one?

  6. added
    Fix Available
    on Jul 16, 2019
  7. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDomain: LS: Completion ListsFix Available

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy