mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 05:34:47 +08:00
28 lines
675 B
TypeScript
28 lines
675 B
TypeScript
// 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);
|
|
}
|
|
|
|
interface HistoryStatic {
|
|
enabled: bool;
|
|
pushState(data, title, url);
|
|
replaceState(data, title, url);
|
|
getState();
|
|
getHash();
|
|
Adapter: HistoryAdapter;
|
|
back();
|
|
forward();
|
|
go(X);
|
|
log(...messages: any[]);
|
|
debug(...messages: any[]);
|
|
}
|
|
|
|
declare var History: HistoryStatic;
|