history.js
history.js copied to clipboard
Closure advanced mode externs
https://github.com/browserstate/history.js/pull/102 suggests that history.js was once compatible with google closure advanced mode, but I can find no trace of current support. Has support for this been removed?
Here's the externs I just created, "works on my machine", I am probably missing some things. Pasting here as a starting point for the next guy who comes along.
/**
* @type {Object}
* @const
*/
var History = {};
History.pushState = function () {};
History.replaceState = function () {};
/** @interface */
function HistoryState() {}
/** @type {Object|null} */
HistoryState.prototype.data;
/** @type {string|null} */
HistoryState.prototype.title;
/** @type {string} */
HistoryState.prototype.url;
/** @type {boolean|number|undefined} */
HistoryState.prototype.queue;
/** @type {boolean|undefined} */
HistoryState.prototype.internal;
/** @type {string} */
HistoryState.prototype.cleanUrl;
/**
* @return {HistoryState}
*/
History.getState = function () {};
/**
* @return {HistoryState}
*/
History.getStateByIndex = function () {};
History.getCurrentIndex = function () {};
History.getHash = function () {};
History.back = function () {};
History.forward = function () {};
History.go = function () {};
History.log = function () {};
History.debug = function () {};
History.options = {};
History.options.hashChangeInterval = function () {};
History.options.safariPollInterval = function () {};
History.options.doubleCheckInterval = function () {};
History.options.disableSuid = function () {};
History.options.storeInterval = function () {};
History.options.busyDelay = function () {};
History.options.debug = function () {};
History.options.initialTitle = function () {};
History.options.html4Mode = function () {};
History.options.delayInit = function () {};
History.state = function () {};
History.length = function () {};
/**
* @type {Object}
* @const
*/
History.Adapter = {};
History.Adapter.bind = function () {};
History.Adapter.trigger = function () {};
History.Adapter.onDomLoad = function () {};