Skip to content

"Go to Definition" shows duplicate results #1344

@RyotaUshio

Description

@RyotaUshio

Hi, I've been fascinated by this project, thank you for the great work!

I'm encountering a problem where VSCode/Cursor's "Go to Definition" commands shows duplicate results for types produced by valibot.
For example:

import * as v from "valibot";

const Data = v.object({
  key: v.string(),
});

const data = v.parse(Data, { key: "hello" });
// Execute "Go to Definition" on the `key` property.
// VSCode/Cursor will show four definitions, but all of
// them points to the exact same location (the second line).
console.log(data.key);

(Full repro repo: https://github.com/RyotaUshio/valibot-repro)

Result:

  • VSCode: Image
  • Cursor: Image

Environment:

  • valibot: 1.1.0
  • typescript: 5.9.3
  • VSCode: 1.105.1
  • Cursor: 2.0.38
  • macOS: 15.5

I would appreciate it if you could help me resolve this issue. Thank you 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions