From 9653895ef1f7d5051d3c059b4ab683a1ca7d8420 Mon Sep 17 00:00:00 2001 From: basarat Date: Sat, 31 Aug 2013 00:47:14 +1000 Subject: [PATCH] historyjs lib.d.ts collision comment --- history/history-tests.ts | 6 ++++++ history/history.d.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/history/history-tests.ts b/history/history-tests.ts index 5b46307ed..7c136d94f 100644 --- a/history/history-tests.ts +++ b/history/history-tests.ts @@ -1,5 +1,11 @@ /// +// 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 = History; + function tests() { if (!Historyjs.enabled) { return false; diff --git a/history/history.d.ts b/history/history.d.ts index d526576e3..a8a3c4004 100644 --- a/history/history.d.ts +++ b/history/history.d.ts @@ -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 = 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; \ No newline at end of file