TypeScript/tests/baselines/reference/interfaceExtendsClass1.js
2015-12-08 17:51:10 -08:00

61 lines
1.4 KiB
TypeScript

//// [interfaceExtendsClass1.ts]
class Control {
private state: any;
}
interface SelectableControl extends Control {
select(): void;
}
class Button extends Control {
select() { }
}
class TextBox extends Control {
select() { }
}
class Image extends Control {
}
class Location {
select() { }
}
//// [interfaceExtendsClass1.js]
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Control = (function () {
function Control() {
}
return Control;
}());
var Button = (function (_super) {
__extends(Button, _super);
function Button() {
_super.apply(this, arguments);
}
Button.prototype.select = function () { };
return Button;
}(Control));
var TextBox = (function (_super) {
__extends(TextBox, _super);
function TextBox() {
_super.apply(this, arguments);
}
TextBox.prototype.select = function () { };
return TextBox;
}(Control));
var Image = (function (_super) {
__extends(Image, _super);
function Image() {
_super.apply(this, arguments);
}
return Image;
}(Control));
var Location = (function () {
function Location() {
}
Location.prototype.select = function () { };
return Location;
}());