Last active
March 24, 2016 07:36
-
-
Save ca0v/8441296 to your computer and use it in GitHub Desktop.
How to extend a dojo class using a typescript class?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<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