Skip to content

Go to definition goes to wrong definition for curried functions #510

@scarf005

Description

@scarf005

Initial checklist

Affected package

typescript@~5.8.3

Steps to reproduce

minimal reproduction repo: https://github.com/issues-repros/vscode-mdx-repro

  1. write following file
const curry2 = () => () => {}

const curry1 = curry2()

export const foo = curry1()

attempt to go to definition on foo.

Actual behavior

with-mdx.mp4

cursor moves to const curry2 = () => <<() => {}>> with MDX extension enabled

Expected behavior

without-mdx.mp4

cursor correctly moves to <<const curry1 = curry2()>> (default behavior on vscode typescript extension)

Runtime

node@23.3.0

Package manager

npm@10.9.0

Operating system

macOS Sequoia 15.4.1 arm64

Build and bundle tools

Vite

Metadata

Metadata

Assignees

No one assigned

    Labels

    🤞 phase/openPost is being triaged manually

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions