Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: TS "Infer return type" inserts file specifier #24344

Open
marvinhagemeister opened this issue Jun 26, 2024 · 1 comment
Open

Bug: TS "Infer return type" inserts file specifier #24344

marvinhagemeister opened this issue Jun 26, 2024 · 1 comment
Labels
bug Something isn't working correctly lsp related to the language server

Comments

@marvinhagemeister
Copy link
Contributor

marvinhagemeister commented Jun 26, 2024

When running the Infer function return type command on a function returning JSX we get the file specifier instead of import("preact/jsx-runtime").JSX.Element:

export function Foo(): import("file:///Users/marvinh/Library/Caches/deno/npm/registry.npmjs.org/preact/10.22.0/src/jsx").JSXInternal.Element {
  return <h1>hello world</h1>;
}
deno-infer-type-jsx.mp4

Steps to reproduce

  1. Clone https://github.com/marvinhagemeister/deno-infer-type-repro
  2. Open mod.tsx in vscode
  3. Put the cursor inside the Foo identifier
  4. Run the infer function return type quick fix

Version: Deno 1.44.4

@marvinhagemeister marvinhagemeister added bug Something isn't working correctly lsp related to the language server labels Jun 26, 2024
@nayeemrmn
Copy link
Collaborator

Similar issue to #21643.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly lsp related to the language server
Projects
None yet
Development

No branches or pull requests

2 participants