Skip to content

Support js/ts.hover.maximumLength and typescript.experimental.expandableHover #5577

@brc-dd

Description

@brc-dd

Vue - Official extension or vue-tsc version

3.0.5

VSCode version

1.102.3

Vue version

3.5.18

TypeScript version

5.9.2

System Info

  System:
    OS: macOS 15.6
    CPU: (10) arm64 Apple M2 Pro
    Memory: 212.00 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.3.0 - ~/.local/state/fnm_multishells/30491_1754071350542/bin/node
    npm: 11.4.2 - ~/.local/state/fnm_multishells/30491_1754071350542/bin/npm
    pnpm: 10.13.1 - ~/.local/state/fnm_multishells/30491_1754071350542/bin/pnpm
    bun: 1.2.19 - /opt/homebrew/bin/bun
  Browsers:
    Safari: 18.6

package.json dependencies

{
  "type": "module",
  "dependencies": {
    "vue": "^3.5.18"
  },
  "devDependencies": {
    "typescript": "^5.9",
    "vue-tsc": "^3.0.5"
  }
}

Steps to reproduce

Create a file foo.ts with this:

type LessThan<N extends number, A extends any[] = []> = N extends A['length']
  ? A[number]
  : LessThan<N, [...A, A['length']]>

type NumericRange<F extends number, T extends number> = Exclude<
  T | LessThan<T>,
  LessThan<F>
>

type LongTuple = NumericRange<1, 150>

Add this to .vscode/settings.json:

{
  "js/ts.hover.maximumLength": 1000
}

What is expected?

Like it is with the extension disabled:

Image

What is actually happening?

Image

Link to minimal reproduction

No response

Any additional comments?

https://devblogs.microsoft.com/typescript/announcing-typescript-5-9/#configurable-maximum-hover-length

typescript.experimental.expandableHover too btw:

  • with extension enabled:
    Image

  • with extension disabled:
    Image

https://devblogs.microsoft.com/typescript/announcing-typescript-5-9/#expandable-hovers-(preview)

Edit: ah it's not a tuple, should've named it LongUnion 😅 I was copying the example from the TS PR but then thought it will get large to write all 150 values here, so picked up the snippet from SO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstupstream: volar

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions