Microsoft/TypeScript

Find all references for ambient module

Open

#9 077 ouverte le 10 juin 2016

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)TypeScript (6 726 forks)batch import
Domain: APIHelp WantedSuggestion

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

Description

// declarations.d.ts
declare module "x" {
    export const x: number;
}

// index.ts
import {x} from "x";

Goto-declaration for "x" in index.ts works, but find-all-references for "x" in declarations.d.ts finds only itself.

In this case one can simply look through each of export in the module's body and find all of their references; but for shorthand ambient modules (declare module "x";) that won't work, as there is no module body.

Guide contributeur