Debian Codegraph @

util/docscripts/tests/extend_declare.js

raw symbols SCIP
1 define(["dojo/main", "dojo/_base/declare", "dojo/_base/lang", "dijit", "dijit/_Widget"], function(dojo, decalre, lang, dijit, _Widget){
2
3 /*===== var _Widget = dijit._Widget =====*/
4
5 var x = declare("dojo.BarBaz", [_Widget], { // util.docscripts.tests.declare_amd
6 // summary: A Thinger
7 // description: Some Long Thinger
8 //
9 // boo: Integer
10 boo: 10,
11
12 constructor: function(args){
13 // summary: The constructor
14 dojo.mixin(this, args);
15 },
16
17 aMemberFn: function(/* String? */a){
18 // summary: Does something
19 // a: String?
20 // Foo.
21 return a || ""; // String
22 },
23
24 postCreate: function(){
25 this.inherited(arguments);
26 this.boo *= 2;
27 }
28
29 });
30
31 lang.extend(dojo.BarBaz, {
32 // someProp: String
33 someProp: "test",
34
35 anotherFn: function(/* String? */b){
36 // summary: Another Function
37 return 10; // Integer
38 }
39 })
40
41 lang.mixin(dojo.BarBaz.prototype, {
42 // moreProps: String
43 // Some more props.
44 moreProps: "winning"
45 })
46
47 var omg = lang.extend;
48
49 omg(dojo.BarBaz, {
50 // winning: Boolean
51 // Always true.
52 winning: true
53 });
54
55 return x;
56 });
57