2014-08-28 01:58:31 +02:00
|
|
|
=== tests/cases/compiler/aliasUsage1_main.ts ===
|
|
|
|
import Backbone = require("aliasUsage1_backbone");
|
2014-08-28 21:40:58 +02:00
|
|
|
>Backbone : typeof Backbone
|
2014-08-28 01:58:31 +02:00
|
|
|
|
|
|
|
import moduleA = require("aliasUsage1_moduleA");
|
2014-08-28 21:40:58 +02:00
|
|
|
>moduleA : typeof moduleA
|
2014-08-28 01:58:31 +02:00
|
|
|
|
|
|
|
interface IHasVisualizationModel {
|
|
|
|
>IHasVisualizationModel : IHasVisualizationModel
|
|
|
|
|
|
|
|
VisualizationModel: typeof Backbone.Model;
|
|
|
|
>VisualizationModel : typeof Backbone.Model
|
|
|
|
>Backbone : typeof Backbone
|
|
|
|
>Model : typeof Backbone.Model
|
|
|
|
}
|
|
|
|
class C2 {
|
|
|
|
>C2 : C2
|
|
|
|
|
|
|
|
x: IHasVisualizationModel;
|
|
|
|
>x : IHasVisualizationModel
|
|
|
|
>IHasVisualizationModel : IHasVisualizationModel
|
|
|
|
|
|
|
|
get A() {
|
|
|
|
>A : IHasVisualizationModel
|
|
|
|
|
|
|
|
return this.x;
|
|
|
|
>this.x : IHasVisualizationModel
|
|
|
|
>this : C2
|
|
|
|
>x : IHasVisualizationModel
|
|
|
|
}
|
|
|
|
set A(x) {
|
|
|
|
>A : IHasVisualizationModel
|
|
|
|
>x : IHasVisualizationModel
|
|
|
|
|
|
|
|
x = moduleA;
|
|
|
|
>x = moduleA : typeof moduleA
|
|
|
|
>x : IHasVisualizationModel
|
|
|
|
>moduleA : typeof moduleA
|
|
|
|
}
|
|
|
|
}
|
|
|
|
=== tests/cases/compiler/aliasUsage1_backbone.ts ===
|
|
|
|
export class Model {
|
|
|
|
>Model : Model
|
|
|
|
|
|
|
|
public someData: string;
|
|
|
|
>someData : string
|
|
|
|
}
|
|
|
|
|
|
|
|
=== tests/cases/compiler/aliasUsage1_moduleA.ts ===
|
|
|
|
import Backbone = require("aliasUsage1_backbone");
|
2014-08-28 21:40:58 +02:00
|
|
|
>Backbone : typeof Backbone
|
2014-08-28 01:58:31 +02:00
|
|
|
|
|
|
|
export class VisualizationModel extends Backbone.Model {
|
|
|
|
>VisualizationModel : VisualizationModel
|
2014-08-28 21:40:58 +02:00
|
|
|
>Backbone : unknown
|
2014-08-28 01:58:31 +02:00
|
|
|
>Model : Backbone.Model
|
|
|
|
|
|
|
|
// interesting stuff here
|
|
|
|
}
|
|
|
|
|