2014-07-13 01:04:16 +02:00
|
|
|
//// [tests/cases/compiler/declFileImportModuleWithExportAssignment.ts] ////
|
|
|
|
|
|
|
|
//// [declFileImportModuleWithExportAssignment_0.ts]
|
|
|
|
|
|
|
|
module m2 {
|
|
|
|
export interface connectModule {
|
|
|
|
(res, req, next): void;
|
|
|
|
}
|
|
|
|
export interface connectExport {
|
|
|
|
use: (mod: connectModule) => connectExport;
|
|
|
|
listen: (port: number) => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
var m2: {
|
|
|
|
(): m2.connectExport;
|
|
|
|
test1: m2.connectModule;
|
|
|
|
test2(): m2.connectModule;
|
|
|
|
};
|
|
|
|
export = m2;
|
|
|
|
|
|
|
|
//// [declFileImportModuleWithExportAssignment_1.ts]
|
|
|
|
/**This is on import declaration*/
|
|
|
|
import a1 = require("declFileImportModuleWithExportAssignment_0");
|
|
|
|
export var a = a1;
|
|
|
|
a.test1(null, null, null);
|
|
|
|
|
|
|
|
|
|
|
|
//// [declFileImportModuleWithExportAssignment_0.js]
|
|
|
|
var m2;
|
|
|
|
module.exports = m2;
|
|
|
|
//// [declFileImportModuleWithExportAssignment_1.js]
|
2014-08-14 15:57:59 +02:00
|
|
|
/**This is on import declaration*/
|
2014-07-13 01:04:16 +02:00
|
|
|
var a1 = require("declFileImportModuleWithExportAssignment_0");
|
|
|
|
exports.a = a1;
|
|
|
|
exports.a.test1(null, null, null);
|
|
|
|
|
|
|
|
|
|
|
|
//// [declFileImportModuleWithExportAssignment_0.d.ts]
|
2014-07-11 23:35:10 +02:00
|
|
|
declare module m2 {
|
|
|
|
interface connectModule {
|
2014-07-12 01:36:06 +02:00
|
|
|
(res: any, req: any, next: any): void;
|
2014-07-11 23:35:10 +02:00
|
|
|
}
|
|
|
|
interface connectExport {
|
2014-07-12 01:36:06 +02:00
|
|
|
use: (mod: connectModule) => connectExport;
|
|
|
|
listen: (port: number) => void;
|
2014-07-11 23:35:10 +02:00
|
|
|
}
|
|
|
|
}
|
2014-07-12 01:36:06 +02:00
|
|
|
declare var m2: {
|
2014-07-16 20:30:14 +02:00
|
|
|
(): m2.connectExport;
|
|
|
|
test1: m2.connectModule;
|
|
|
|
test2(): m2.connectModule;
|
2014-07-12 01:36:06 +02:00
|
|
|
};
|
2014-07-13 01:04:16 +02:00
|
|
|
export = m2;
|
2014-08-06 22:16:41 +02:00
|
|
|
//// [declFileImportModuleWithExportAssignment_1.d.ts]
|
2014-08-14 16:48:14 +02:00
|
|
|
/**This is on import declaration*/
|
2014-08-06 22:16:41 +02:00
|
|
|
import a1 = require("declFileImportModuleWithExportAssignment_0");
|
|
|
|
export declare var a: {
|
|
|
|
(): a1.connectExport;
|
|
|
|
test1: a1.connectModule;
|
|
|
|
test2(): a1.connectModule;
|
|
|
|
};
|