UNPKG

typescript-closure-tools

Version:

Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files

32 lines (27 loc) 898 B
// Type definitions for History.js // Project: https://github.com/balupton/History.js // Definitions by: Boris Yankov <https://github.com/borisyankov/> // Definitions: https://github.com/borisyankov/DefinitelyTyped interface HistoryAdapter { bind(element, event, callback); trigger(element, event); onDomLoad(callback); } // Since History is defined in lib.d.ts as well // the name for our interfaces was chosen to be Historyjs // However at runtime you would need to do // https://github.com/borisyankov/DefinitelyTyped/issues/277 // var Historyjs: Historyjs = <any>History; interface Historyjs { enabled: boolean; pushState(data, title, url); replaceState(data, title, url); getState(); getHash(); Adapter: HistoryAdapter; back(); forward(); go(X); log(...messages: any[]); debug(...messages: any[]); }