46 lines
1 KiB
Plaintext
46 lines
1 KiB
Plaintext
|
=== tests/cases/compiler/declaredExternalModule.ts ===
|
||
|
declare module 'connect' {
|
||
|
|
||
|
interface connectModule {
|
||
|
>connectModule : connectModule
|
||
|
|
||
|
(res, req, next): void;
|
||
|
>res : any
|
||
|
>req : any
|
||
|
>next : any
|
||
|
|
||
|
}
|
||
|
|
||
|
interface connectExport {
|
||
|
>connectExport : connectExport
|
||
|
|
||
|
use: (mod: connectModule) => connectExport;
|
||
|
>use : (mod: connectModule) => connectExport
|
||
|
>mod : connectModule
|
||
|
>connectModule : connectModule
|
||
|
>connectExport : connectExport
|
||
|
|
||
|
listen: (port: number) => void;
|
||
|
>listen : (port: number) => void
|
||
|
>port : number
|
||
|
|
||
|
}
|
||
|
|
||
|
var server: {
|
||
|
>server : { (): connectExport; test1: connectModule; test2(): connectModule; }
|
||
|
|
||
|
(): connectExport;
|
||
|
>connectExport : connectExport
|
||
|
|
||
|
test1: connectModule; // No error
|
||
|
>test1 : connectModule
|
||
|
>connectModule : connectModule
|
||
|
|
||
|
test2(): connectModule; // ERROR: Return type of method from exported interface has or is using private type ''connect'.connectModule'.
|
||
|
>test2 : () => connectModule
|
||
|
>connectModule : connectModule
|
||
|
|
||
|
};
|
||
|
}
|
||
|
|