Skip to content

Instantly share code, notes, and snippets.

@ca0v
Last active March 24, 2016 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ca0v/8441296 to your computer and use it in GitHub Desktop.
Save ca0v/8441296 to your computer and use it in GitHub Desktop.
How to extend a dojo class using a typescript class?
///<reference path="../ref.d.ts"/>
import declare = require("dojo/_base/declare");
import lang = require("dojo/_base/lang");
import ContentPane = require("dijit/layout/ContentPane");
class LayerStylePane extends ContentPane {
constructor(options: any, container?: HTMLElement) {
this.baseClass = "layerStylePane";
options.content = "<b>HELLO</b>";
super(options, container);
}
foo() {
}
}
export = LayerStylePane;
// in mydijit.d.ts:
declare module "dijit/layout/ContentPane"
{
class ContentPane extends dijit._Widget {
}
export = ContentPane;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment