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

Missing reference occurrence for mapped types #187

Open
olafurpg opened this issue Oct 19, 2022 · 0 comments
Open

Missing reference occurrence for mapped types #187

olafurpg opened this issue Oct 19, 2022 · 0 comments

Comments

@olafurpg
Copy link
Member

Test case supplied by @varungandhi-src in https://github.com/sourcegraph/scip-typescript/pull/185/files#r998813172

Go to definition in darkMode at the bottom should go to `FeatureFlags.darkMode. Currently, it emits a definition of a new symbol, not a reference to the original symbol

type OptionsFlags<Type> = {
  [Property in keyof Type]: boolean;
};

type FeatureFlags = {
  darkMode: () => void;
};
 
type FeatureOptions = OptionsFlags<FeatureFlags>;
// implicitly 
// type FeatureOptions = {
//    darkMode: boolean;
// }

const fo: FeatureOptions = { darkMode: true };
                          // ^ go to def

Context https://www.typescriptlang.org/docs/handbook/2/mapped-types.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants