public
Last active

Mia output for prototypical code with mia annotations.

  • Download Gist
mia.json
JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
{
"name": "Module",
"exports": {
"Module.External": {
"type": "Class",
"id": 52,
"name": "External",
"comment": {
"description": "The External Class",
"params": [{
"type": "String",
"description": "The name of the external",
"defaultValue": null
}],
"returns": null
},
"bases": [13],
"params": ["name"],
"statics": [],
"members": [{
"type": "Property",
"id": 43,
"name": "name",
"comment": {
"description": null,
"params": [{
"type": "String",
"description": "Name",
"defaultValue": null
}],
"returns": null
}
}, {
"type": "Method",
"id": 85,
"name": "add",
"comment": {
"description": null,
"params": [{
"type": "Integer",
"description": "Value A",
"defaultValue": null
}, {
"type": "Integer",
"description": "Value B",
"defaultValue": null
}],
"returns": {
"type": "Integer",
"description": "The result",
"defaultValue": null
}
},
"params": ["a", "b"],
"supers": [13]
}]
}
},
"related": {
"Internal": {
"type": "Class",
"id": 13,
"name": "Internal",
"comment": {
"description": "A Internal Base Class",
"params": [{
"type": "String",
"description": "The name of the internal",
"defaultValue": null
}],
"returns": null
},
"bases": [],
"params": [],
"statics": [{
"type": "Property",
"id": 19,
"name": "uid",
"comment": {
"description": null,
"params": [{
"type": "Integer",
"description": "Unique ID counter for instance ids",
"defaultValue": null
}],
"returns": null
}
}],
"members": [{
"type": "Property",
"id": 10,
"name": "id",
"comment": {
"description": null,
"params": [{
"type": "Integer",
"description": "The unique ID of the class instance",
"defaultValue": null
}],
"returns": null
}
}, {
"type": "Method",
"id": 34,
"name": "add",
"comment": {
"description": null,
"params": [{
"type": "Integer",
"description": "Value A",
"defaultValue": null
}, {
"type": "Integer",
"description": "Value B",
"defaultValue": null
}],
"returns": {
"type": "Integer",
"description": "The result",
"defaultValue": null
}
},
"params": ["a", "b"],
"supers": []
}]
}
},
"internal": {}
}
source.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/**
* Top level module documentation.
*/
(function(exports) {
 
/** A Internal Base Class; {String} The name of the internal */
var Internal = function() {
/** {Integer}: The unique ID of the class instance */
this.id = ++Internal.id;
 
};
 
/** {Integer}: Unique ID counter for instance ids */
Internal.uid = 0;
 
/** {Integer}: Value A; {Integer}: Value B -> {Integer}: The result */
Internal.prototype.add = function(a, b) {
return a + b;
};
 
/** The External Class; {String} The name of the external */
function External(name) {
 
/** {String}: Name */
this.name = name;
 
Internal.call(this);
 
}
 
External.prototype = Object.create(Internal.prototype);
 
/** {Integer}: Value A; {Integer}: Value B -> {Integer}: The result */
External.prototype.add = function(a, b) {
return Internal.prototype.add.call(this, a, b);
};
 
// Public interface
exports.External = External;
 
})(typeof module === 'undefined' ? (window.Module = {}) : module.exports);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.