2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/file2.ts ===
|
|
|
|
import appJs = require("file1");
|
2014-08-28 21:40:58 +02:00
|
|
|
>appJs : typeof appJs
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
import Services = appJs.Services;
|
2014-08-28 21:40:58 +02:00
|
|
|
>Services : typeof appJs.Services
|
2014-08-25 19:36:12 +02:00
|
|
|
>appJs : typeof appJs
|
|
|
|
>Services : typeof appJs.Services
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
import UserServices = Services.UserServices;
|
2014-08-28 21:40:58 +02:00
|
|
|
>UserServices : typeof Services.UserServices
|
2014-08-25 19:36:12 +02:00
|
|
|
>Services : typeof appJs.Services
|
|
|
|
>UserServices : Services.UserServices
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var x = new UserServices().getUserName();
|
|
|
|
>x : string
|
|
|
|
>new UserServices().getUserName() : string
|
|
|
|
>new UserServices().getUserName : () => string
|
2014-08-25 19:36:12 +02:00
|
|
|
>new UserServices() : Services.UserServices
|
|
|
|
>UserServices : typeof Services.UserServices
|
2014-08-15 23:33:16 +02:00
|
|
|
>getUserName : () => string
|
|
|
|
|
|
|
|
=== tests/cases/compiler/file1.ts ===
|
|
|
|
module App {
|
2014-08-28 21:40:58 +02:00
|
|
|
>App : typeof App
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export module Services {
|
2014-08-28 21:40:58 +02:00
|
|
|
>Services : typeof Services
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export class UserServices {
|
|
|
|
>UserServices : UserServices
|
|
|
|
|
|
|
|
public getUserName(): string {
|
|
|
|
>getUserName : () => string
|
|
|
|
|
|
|
|
return "Bill Gates";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
import Mod = App;
|
2014-08-28 21:40:58 +02:00
|
|
|
>Mod : typeof App
|
2014-08-15 23:33:16 +02:00
|
|
|
>App : typeof App
|
|
|
|
|
|
|
|
export = Mod;
|
|
|
|
>Mod : typeof App
|
|
|
|
|