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

Source mappings are missing for serialized properties #60004

Open
Andarist opened this issue Sep 19, 2024 · 0 comments Β· May be fixed by #60005
Open

Source mappings are missing for serialized properties #60004

Andarist opened this issue Sep 19, 2024 · 0 comments Β· May be fixed by #60005
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@Andarist
Copy link
Contributor

πŸ”Ž Search Terms

source map declaration map properties symbols navigation definition goto

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

N/A

πŸ’» Code

// api.ts
type ValidateShape<T> = {
  [K in keyof T]: T[K];
};

function test<T>(arg: ValidateShape<T>) {
  function createCaller<T>(arg: T): () => {
    [K in keyof T]: () => T[K];
  } {
    return null as any;
  }
  return {
    createCaller: createCaller(arg),
  };
}

const api = test({
  foo/*target*/: 1,
  bar: "",
});

export const createCaller = api.createCaller;

// main.ts

import { createCaller } from "./api";
const caller = createCaller();
caller.foo/*source*/;

πŸ™ Actual behavior

Please consider the 2 files above as 2 separate projects.

When those files are in the same project we can successfully go from the source marker to the target marker with "go to definition" and others like it. The same works with project references on.

However, when api.ts gets compiled with declaration maps and consumed through that then this navigation no longer works correctly.

πŸ™‚ Expected behavior

I'd expect this navigation to continue to work

Additional information about the issue

No response

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this labels Sep 19, 2024
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants