Instantly share code, notes, and snippets.

Embed
What would you like to do?
Externs for Backbone.js and Underscore.js
/*
* @fileoverview Externs for backbone-0.9.1.js
*
* built with http://www.dotnetwise.com/Code/Externs/index.html
* see also: http://blog.dotnetwise.com/2009/11/closure-compiler-externs-extractor.html
* via: http://code.google.com/p/closure-compiler/wiki/FAQ#How_do_I_write_an_externs_file?
*
* Note: when building via that page, you first need to load in underscrore.js, as that's a dependency.
* also, after running the extern for Backbone, you need to manually run it for:
* Backbone.Model.prototype, Backbone.Collection.prototype, Backbone.Router.prototype,
* Backbone.History.prototype, and Backbone.View.prototype
* because these objects are modified using _.extend(Backbone.Model.prototype ...)
* @see http://documentcloud.github.com/backbone/
* @externs
*/
var Backbone = {
"VERSION": {},
"setDomLibrary": function () {},
"noConflict": function () {},
"emulateHTTP": {},
"emulateJSON": {},
"Events": {
"on": function () {},
"off": function () {},
"trigger": function () {},
"bind": function () {},
"unbind": function () {}
},
"Model": function () {},
"Collection": function () {},
"Router": function () {},
"History": function () {},
"View": function () {},
"sync": function () {},
"wrapError": function () {}
};
Backbone.Model.prototype = {
"on": function () {},
"off": function () {},
"trigger": function () {},
"bind": function () {},
"unbind": function () {},
"idAttribute": {},
"initialize": function () {},
"toJSON": function () {},
"get": function () {},
"escape": function () {},
"has": function () {},
"set": function () {},
"unset": function () {},
"clear": function () {},
"fetch": function () {},
"save": function () {},
"destroy": function () {},
"url": function () {},
"parse": function () {},
"clone": function () {},
"isNew": function () {},
"change": function () {},
"hasChanged": function () {},
"changedAttributes": function () {},
"previous": function () {},
"previousAttributes": function () {},
"isValid": function () {},
"_validate": function () {}
};
Backbone.Collection.prototype = {
"on": function () {},
"off": function () {},
"trigger": function () {},
"bind": function () {},
"unbind": function () {},
"model": function () {},
"initialize": function () {},
"toJSON": function () {},
"add": function () {},
"remove": function () {},
"get": function () {},
"getByCid": function () {},
"at": function () {},
"sort": function () {},
"pluck": function () {},
"reset": function () {},
"fetch": function () {},
"create": function () {},
"parse": function () {},
"chain": function () {},
"_reset": function () {},
"_prepareModel": function () {},
"_removeReference": function () {},
"_onModelEvent": function () {},
"forEach": function () {},
"each": function () {},
"map": function () {},
"reduce": function () {},
"reduceRight": function () {},
"find": function () {},
"detect": function () {},
"filter": function () {},
"select": function () {},
"reject": function () {},
"every": function () {},
"all": function () {},
"some": function () {},
"any": function () {},
"include": function () {},
"contains": function () {},
"invoke": function () {},
"max": function () {},
"min": function () {},
"sortBy": function () {},
"sortedIndex": function () {},
"toArray": function () {},
"size": function () {},
"first": function () {},
"initial": function () {},
"rest": function () {},
"last": function () {},
"without": function () {},
"indexOf": function () {},
"shuffle": function () {},
"lastIndexOf": function () {},
"isEmpty": function () {},
"groupBy": function () {}
};
Backbone.Router.prototype = {
"on": function () {},
"off": function () {},
"trigger": function () {},
"bind": function () {},
"unbind": function () {},
"initialize": function () {},
"route": function () {},
"navigate": function () {},
"_bindRoutes": function () {},
"_routeToRegExp": function () {},
"_extractParameters": function () {}
};
Backbone.History.prototype = {
"on": function () {},
"off": function () {},
"trigger": function () {},
"bind": function () {},
"unbind": function () {},
"interval": {},
"getFragment": function () {},
"start": function () {},
"stop": function () {},
"route": function () {},
"checkUrl": function () {},
"loadUrl": function () {},
"navigate": function () {},
"_updateHash": function () {}
};
Backbone.View.prototype = {
"on": function () {},
"off": function () {},
"trigger": function () {},
"bind": function () {},
"unbind": function () {},
"tagName": {},
"$": function () {},
"initialize": function () {},
"render": function () {},
"remove": function () {},
"make": function () {},
"setElement": function () {},
"delegateEvents": function () {},
"undelegateEvents": function () {},
"_configure": function () {},
"_ensureElement": function () {}
};
/*
* @fileoverview Externs for underscore-1.3.1.js
*
* built with http://www.dotnetwise.com/Code/Externs/index.html
* see also: http://blog.dotnetwise.com/2009/11/closure-compiler-externs-extractor.html
* via: http://code.google.com/p/closure-compiler/wiki/FAQ#How_do_I_write_an_externs_file?
*
* @see http://documentcloud.github.com/underscore/
* @externs
*/
var _ = {
"VERSION": {},
"forEach": function () {},
"each": function () {},
"collect": function () {},
"map": function () {},
"inject": function () {},
"foldl": function () {},
"reduce": function () {},
"foldr": function () {},
"reduceRight": function () {},
"detect": function () {},
"find": function () {},
"select": function () {},
"filter": function () {},
"reject": function () {},
"all": function () {},
"every": function () {},
"any": function () {},
"some": function () {},
"contains": function () {},
"include": function () {},
"invoke": function () {},
"pluck": function () {},
"max": function () {},
"min": function () {},
"shuffle": function () {},
"sortBy": function () {},
"groupBy": function () {},
"sortedIndex": function () {},
"toArray": function () {},
"size": function () {},
"head": function () {},
"first": function () {},
"initial": function () {},
"last": function () {},
"tail": function () {},
"rest": function () {},
"compact": function () {},
"flatten": function () {},
"without": function () {},
"unique": function () {},
"uniq": function () {},
"union": function () {},
"intersect": function () {},
"intersection": function () {},
"difference": function () {},
"zip": function () {},
"indexOf": function () {},
"lastIndexOf": function () {},
"range": function () {},
"bind": function () {},
"bindAll": function () {},
"memoize": function () {},
"delay": function () {},
"defer": function () {},
"throttle": function () {},
"debounce": function () {},
"once": function () {},
"wrap": function () {},
"compose": function () {},
"after": function () {},
"keys": function () {},
"values": function () {},
"methods": function () {},
"functions": function () {},
"extend": function () {},
"defaults": function () {},
"clone": function () {},
"tap": function () {},
"isEqual": function () {},
"isEmpty": function () {},
"isElement": function () {},
"isArray": function () {},
"isObject": function () {},
"isArguments": function () {},
"isFunction": function () {},
"isString": function () {},
"isNumber": function () {},
"isNaN": function () {},
"isBoolean": function () {},
"isDate": function () {},
"isRegExp": function () {},
"isNull": function () {},
"isUndefined": function () {},
"has": function () {},
"noConflict": function () {},
"identity": function () {},
"times": function () {},
"escape": function () {},
"mixin": function () {},
"uniqueId": function () {},
"templateSettings": {
"evaluate": function () {},
"interpolate": function () {},
"escape": function () {}
},
"template": function () {},
"chain": function () {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment