45 lines
1.7 KiB
Text
45 lines
1.7 KiB
Text
=== tests/cases/compiler/declaredExternalModule.ts ===
|
|
declare module 'connect' {
|
|
|
|
interface connectModule {
|
|
>connectModule : Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
|
|
|
(res, req, next): void;
|
|
>res : Symbol(res, Decl(declaredExternalModule.ts, 4, 9))
|
|
>req : Symbol(req, Decl(declaredExternalModule.ts, 4, 13))
|
|
>next : Symbol(next, Decl(declaredExternalModule.ts, 4, 18))
|
|
|
|
}
|
|
|
|
interface connectExport {
|
|
>connectExport : Symbol(connectExport, Decl(declaredExternalModule.ts, 6, 5))
|
|
|
|
use: (mod: connectModule) => connectExport;
|
|
>use : Symbol(use, Decl(declaredExternalModule.ts, 8, 29))
|
|
>mod : Symbol(mod, Decl(declaredExternalModule.ts, 10, 14))
|
|
>connectModule : Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
|
>connectExport : Symbol(connectExport, Decl(declaredExternalModule.ts, 6, 5))
|
|
|
|
listen: (port: number) => void;
|
|
>listen : Symbol(listen, Decl(declaredExternalModule.ts, 10, 51))
|
|
>port : Symbol(port, Decl(declaredExternalModule.ts, 12, 17))
|
|
|
|
}
|
|
|
|
var server: {
|
|
>server : Symbol(server, Decl(declaredExternalModule.ts, 16, 7))
|
|
|
|
(): connectExport;
|
|
>connectExport : Symbol(connectExport, Decl(declaredExternalModule.ts, 6, 5))
|
|
|
|
test1: connectModule; // No error
|
|
>test1 : Symbol(test1, Decl(declaredExternalModule.ts, 18, 26))
|
|
>connectModule : Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
|
|
|
test2(): connectModule; // ERROR: Return type of method from exported interface has or is using private type ''connect'.connectModule'.
|
|
>test2 : Symbol(test2, Decl(declaredExternalModule.ts, 20, 29))
|
|
>connectModule : Symbol(connectModule, Decl(declaredExternalModule.ts, 0, 26))
|
|
|
|
};
|
|
}
|
|
|