2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/declaredExternalModule.ts ===
|
|
|
|
declare module 'connect' {
|
|
|
|
|
|
|
|
interface connectModule {
|
2015-04-13 23:01:57 +02:00
|
|
|
>connectModule : connectModule, Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
(res, req, next): void;
|
2015-04-13 23:01:57 +02:00
|
|
|
>res : any, Symbol(res, Decl(declaredExternalModule.ts, 4, 9))
|
|
|
|
>req : any, Symbol(req, Decl(declaredExternalModule.ts, 4, 13))
|
|
|
|
>next : any, Symbol(next, Decl(declaredExternalModule.ts, 4, 18))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interface connectExport {
|
2015-04-13 23:01:57 +02:00
|
|
|
>connectExport : connectExport, Symbol(connectExport, Decl(declaredExternalModule.ts, 6, 5))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
use: (mod: connectModule) => connectExport;
|
2015-04-13 23:01:57 +02:00
|
|
|
>use : (mod: connectModule) => connectExport, Symbol(use, Decl(declaredExternalModule.ts, 8, 29))
|
|
|
|
>mod : connectModule, Symbol(mod, Decl(declaredExternalModule.ts, 10, 14))
|
|
|
|
>connectModule : connectModule, Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
|
|
|
>connectExport : connectExport, Symbol(connectExport, Decl(declaredExternalModule.ts, 6, 5))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
listen: (port: number) => void;
|
2015-04-13 23:01:57 +02:00
|
|
|
>listen : (port: number) => void, Symbol(listen, Decl(declaredExternalModule.ts, 10, 51))
|
|
|
|
>port : number, Symbol(port, Decl(declaredExternalModule.ts, 12, 17))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var server: {
|
2015-04-13 23:01:57 +02:00
|
|
|
>server : { (): connectExport; test1: connectModule; test2(): connectModule; }, Symbol(server, Decl(declaredExternalModule.ts, 16, 7))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
(): connectExport;
|
2015-04-13 23:01:57 +02:00
|
|
|
>connectExport : connectExport, Symbol(connectExport, Decl(declaredExternalModule.ts, 6, 5))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
test1: connectModule; // No error
|
2015-04-13 23:01:57 +02:00
|
|
|
>test1 : connectModule, Symbol(test1, Decl(declaredExternalModule.ts, 18, 26))
|
|
|
|
>connectModule : connectModule, Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
test2(): connectModule; // ERROR: Return type of method from exported interface has or is using private type ''connect'.connectModule'.
|
2015-04-13 23:01:57 +02:00
|
|
|
>test2 : () => connectModule, Symbol(test2, Decl(declaredExternalModule.ts, 20, 29))
|
|
|
|
>connectModule : connectModule, Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|