Last active
December 21, 2015 06:09
-
-
Save BonsaiDen/6262270 to your computer and use it in GitHub Desktop.
Mia output for prototypical code with mia annotations.
This file contains 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
{ | |
"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": {} | |
} |
This file contains 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
/** | |
* 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); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment