Skip to content

Missing reference occurrence for mapped types #187

Open
@olafurpg

Description

@olafurpg

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions