TypeScript/tests/baselines/reference/import_reference-exported-alias.types
2015-04-15 16:44:20 -07:00

50 lines
1.1 KiB
Plaintext

=== tests/cases/compiler/file2.ts ===
import appJs = require("file1");
>appJs : typeof appJs
import Services = appJs.Services;
>Services : typeof appJs.Services
>appJs : typeof appJs
>Services : typeof appJs.Services
import UserServices = Services.UserServices;
>UserServices : typeof Services.UserServices
>Services : typeof appJs.Services
>UserServices : Services.UserServices
var x = new UserServices().getUserName();
>x : string
>new UserServices().getUserName() : string
>new UserServices().getUserName : () => string
>new UserServices() : Services.UserServices
>UserServices : typeof Services.UserServices
>getUserName : () => string
=== tests/cases/compiler/file1.ts ===
module App {
>App : typeof App
export module Services {
>Services : typeof Services
export class UserServices {
>UserServices : UserServices
public getUserName(): string {
>getUserName : () => string
return "Bill Gates";
>"Bill Gates" : string
}
}
}
}
import Mod = App;
>Mod : typeof App
>App : typeof App
export = Mod;
>Mod : typeof App