Microsoft/TypeScript

Find all references for ambient module

オープン

#9,077 opened on 2016/06/10

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (13,395 件のフォーク)batch import
Domain: APIHelp WantedSuggestion

Repository metrics

Stars
 (108,860 個のスター)
PR merge metrics
 (PR metrics pending)

説明

// 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.

コントリビューターガイド