historyjs lib.d.ts collision comment

This commit is contained in:
basarat
2013-08-31 00:47:14 +10:00
parent d82570125e
commit 9653895ef1
2 changed files with 12 additions and 2 deletions
+6
View File
@@ -1,5 +1,11 @@
/// <reference path="history.d.ts" />
// 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;
function tests() {
if (!Historyjs.enabled) {
return false;
+6 -2
View File
@@ -10,6 +10,12 @@ interface HistoryAdapter {
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);
@@ -23,5 +29,3 @@ interface Historyjs {
log(...messages: any[]);
debug(...messages: any[]);
}
declare var Historyjs: Historyjs;