mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-04 16:04:45 +08:00
26 lines
606 B
TypeScript
26 lines
606 B
TypeScript
// Type definitions for History.js
|
|
// Project: https://github.com/balupton/History.js
|
|
// 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;
|