60 lines
3.1 KiB
Text
60 lines
3.1 KiB
Text
=== tests/cases/compiler/aliasUsageInGenericFunction_main.ts ===
|
|
import Backbone = require("aliasUsageInGenericFunction_backbone");
|
|
>Backbone : Symbol(Backbone, Decl(aliasUsageInGenericFunction_main.ts, 0, 0))
|
|
|
|
import moduleA = require("aliasUsageInGenericFunction_moduleA");
|
|
>moduleA : Symbol(moduleA, Decl(aliasUsageInGenericFunction_main.ts, 0, 66))
|
|
|
|
interface IHasVisualizationModel {
|
|
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 1, 64))
|
|
|
|
VisualizationModel: typeof Backbone.Model;
|
|
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 2, 34))
|
|
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
|
|
>Backbone : Symbol(Backbone, Decl(aliasUsageInGenericFunction_main.ts, 0, 0))
|
|
>Model : Symbol(Backbone.Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
|
|
}
|
|
function foo<T extends { a: IHasVisualizationModel }>(x: T) {
|
|
>foo : Symbol(foo, Decl(aliasUsageInGenericFunction_main.ts, 4, 1))
|
|
>T : Symbol(T, Decl(aliasUsageInGenericFunction_main.ts, 5, 13))
|
|
>a : Symbol(a, Decl(aliasUsageInGenericFunction_main.ts, 5, 24))
|
|
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 1, 64))
|
|
>x : Symbol(x, Decl(aliasUsageInGenericFunction_main.ts, 5, 54))
|
|
>T : Symbol(T, Decl(aliasUsageInGenericFunction_main.ts, 5, 13))
|
|
|
|
return x;
|
|
>x : Symbol(x, Decl(aliasUsageInGenericFunction_main.ts, 5, 54))
|
|
}
|
|
var r = foo({ a: moduleA });
|
|
>r : Symbol(r, Decl(aliasUsageInGenericFunction_main.ts, 8, 3))
|
|
>foo : Symbol(foo, Decl(aliasUsageInGenericFunction_main.ts, 4, 1))
|
|
>a : Symbol(a, Decl(aliasUsageInGenericFunction_main.ts, 8, 13))
|
|
>moduleA : Symbol(moduleA, Decl(aliasUsageInGenericFunction_main.ts, 0, 66))
|
|
|
|
var r2 = foo({ a: <IHasVisualizationModel>null });
|
|
>r2 : Symbol(r2, Decl(aliasUsageInGenericFunction_main.ts, 9, 3))
|
|
>foo : Symbol(foo, Decl(aliasUsageInGenericFunction_main.ts, 4, 1))
|
|
>a : Symbol(a, Decl(aliasUsageInGenericFunction_main.ts, 9, 14))
|
|
>IHasVisualizationModel : Symbol(IHasVisualizationModel, Decl(aliasUsageInGenericFunction_main.ts, 1, 64))
|
|
|
|
=== tests/cases/compiler/aliasUsageInGenericFunction_backbone.ts ===
|
|
export class Model {
|
|
>Model : Symbol(Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
|
|
|
|
public someData: string;
|
|
>someData : Symbol(someData, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 20))
|
|
}
|
|
|
|
=== tests/cases/compiler/aliasUsageInGenericFunction_moduleA.ts ===
|
|
import Backbone = require("aliasUsageInGenericFunction_backbone");
|
|
>Backbone : Symbol(Backbone, Decl(aliasUsageInGenericFunction_moduleA.ts, 0, 0))
|
|
|
|
export class VisualizationModel extends Backbone.Model {
|
|
>VisualizationModel : Symbol(VisualizationModel, Decl(aliasUsageInGenericFunction_moduleA.ts, 0, 66))
|
|
>Backbone.Model : Symbol(Backbone.Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
|
|
>Backbone : Symbol(Backbone, Decl(aliasUsageInGenericFunction_moduleA.ts, 0, 0))
|
|
>Model : Symbol(Backbone.Model, Decl(aliasUsageInGenericFunction_backbone.ts, 0, 0))
|
|
|
|
// interesting stuff here
|
|
}
|
|
|