Skip to content

Instantly share code, notes, and snippets.

@wmakeev
Last active November 25, 2015 13:51
Show Gist options
  • Save wmakeev/7f0f7b980e2ed84a5d9d to your computer and use it in GitHub Desktop.
Save wmakeev/7f0f7b980e2ed84a5d9d to your computer and use it in GitHub Desktop.
JsDoc
/**
* @namespace DriveApp
* @property {function} searchFiles
*/
/**
* @namespace Utilities
* @property {function} formatString
*/
/**
* @typedef {Object} File
* @property {function} setTrashed
* @property {function} getName
*/
/**
* @typedef {Object} MailApp
* @property {function} sendEmail
*/
/**
* @typedef {Object} HtmlService
* @property {function} createTemplateFromFile
*/
/**
* @typedef {Object} CustomerOrder
* @property {string} sourceAgentUuid
* @property {string} stateUuid
*/
/**
* @typedef {Object|String} RouteOptions If it's a string it means pattern for path match
* @property {String} [name] Name of the route
* @property {String} pattern Pattern for path match
* @property {Object} [conditions] Conditions for params in pattern
* @property {Object} [defaults] Defaults values for params in pattern
* @property {Object} [data] Data that will be bonded with route
* @property {Function} [filterMatch] Function that will be applied after match method with its result
* @property {Function} [filterBuild] Function that will be applied before build method with input params
* @property {Boolean} [isTrailingSlashOptional=true] If `true` trailing slash is optional
* @property {Boolean} [useQueryString=true] If `true` query string will be parsed and returned
*/
/**
* Creates new route
* @constructor
* @param {RouteOptions} options
*/
var Router = function (options) {
if ( ! (this instanceof Router)) {
return new Router(options);
}
return this;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment