How can I inherit from a constructor function in javascript?
e.g. I have a base class written in native js
var MyModule;
(function (MyModule) {
var MyBase = (function () {
function MyBase(container, $MyElement) {
this._container = container;
this._$MyElement = $MyElement;
}
MyBase.prototype.toString = function () {
return this._previewType;
};
MyBase.prototype.method1 = function(){
};
MyBase.prototype.method2 = function () {
return this._isPreviewAffected;
};
return MyBase;
})();
MyModule.MyBase = MyBase;
})(MyModule || (MyModule = {}));
How do I inherit it in typescript. I tried following code. I get the error "Incorrect reference: referenced file: "my-base.js" cannot be resolved"
/// <reference path="my-base.js" />
module MyModule {
export class MyConcrete extends MyBase {
}
}