mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-16 06:28:12 -05:00
Emit declaration if its identifier is used in export assignment of external module
This commit is contained in:
@@ -23,6 +23,9 @@ define(["require", "exports"], function (require, exports) {
|
||||
|
||||
|
||||
//// [declFileExportAssignmentOfGenericInterface_0.d.ts]
|
||||
interface Foo<T> {
|
||||
a;
|
||||
}
|
||||
export = Foo;
|
||||
//// [declFileExportAssignmentOfGenericInterface_1.d.ts]
|
||||
export declare var x;
|
||||
|
||||
@@ -59,6 +59,12 @@ define(["require", "exports"], function (require, exports) {
|
||||
|
||||
|
||||
//// [declFileExportImportChain_a.d.ts]
|
||||
declare module m1 {
|
||||
module m2 {
|
||||
class c1 {
|
||||
}
|
||||
}
|
||||
}
|
||||
export = m1;
|
||||
//// [declFileExportImportChain_b.d.ts]
|
||||
export import a = require("declFileExportImportChain_a");
|
||||
|
||||
@@ -52,6 +52,12 @@ define(["require", "exports"], function (require, exports) {
|
||||
|
||||
|
||||
//// [declFileExportImportChain2_a.d.ts]
|
||||
declare module m1 {
|
||||
module m2 {
|
||||
class c1 {
|
||||
}
|
||||
}
|
||||
}
|
||||
export = m1;
|
||||
//// [declFileExportImportChain2_b.d.ts]
|
||||
export = a;
|
||||
|
||||
@@ -36,6 +36,15 @@ exports.a.test1(null, null, null);
|
||||
|
||||
|
||||
//// [declFileImportModuleWithExportAssignment_0.d.ts]
|
||||
declare module m2 {
|
||||
interface connectModule {
|
||||
(res, req, next);
|
||||
}
|
||||
interface connectExport {
|
||||
use;
|
||||
listen;
|
||||
}
|
||||
}
|
||||
export = m2;
|
||||
//// [declFileImportModuleWithExportAssignment_1.d.ts]
|
||||
export declare var a;
|
||||
|
||||
@@ -24,4 +24,13 @@ module.exports = m2;
|
||||
|
||||
|
||||
//// [declareFileExportAssignment.d.ts]
|
||||
declare module m2 {
|
||||
interface connectModule {
|
||||
(res, req, next);
|
||||
}
|
||||
interface connectExport {
|
||||
use;
|
||||
listen;
|
||||
}
|
||||
}
|
||||
export = m2;
|
||||
|
||||
@@ -40,6 +40,9 @@ define(["require", "exports", './exporter'], function (require, exports, e) {
|
||||
|
||||
//// [w1.d.ts]
|
||||
export = Widget1;
|
||||
declare class Widget1 {
|
||||
name;
|
||||
}
|
||||
//// [exporter.d.ts]
|
||||
export import w = require('./w1');
|
||||
//// [consumer.d.ts]
|
||||
|
||||
@@ -32,6 +32,9 @@ define(["require", "exports"], function (require, exports) {
|
||||
|
||||
//// [w1.d.ts]
|
||||
export = Widget1;
|
||||
interface Widget1 {
|
||||
name;
|
||||
}
|
||||
//// [exporter.d.ts]
|
||||
export import w = require('./w1');
|
||||
//// [consumer.d.ts]
|
||||
|
||||
@@ -39,4 +39,8 @@ declare module "SubModule" {
|
||||
}
|
||||
//// [missingImportAfterModuleImport_1.d.ts]
|
||||
/// <reference path='missingImportAfterModuleImport_0.d.ts' />
|
||||
declare class MainModule {
|
||||
SubModule;
|
||||
constructor ();
|
||||
}
|
||||
export = MainModule;
|
||||
|
||||
Reference in New Issue
Block a user