jsuri: need to declare global Uri as type instead of var

Declaring the global Uri as a var instead of as a type leads to runtime
errors as the jsuri script leaks Uri to global directly when not loaded
via AMD or CommonJS, instead of leaking a jsuri module object.

Developers working with jsuri in the global namespace need to use Uri
directly instead of prfacing with jsuri in order to avoid runtime issues
with 'jsuri' being undefined.
This commit is contained in:
Chris Charabaruk
2015-05-07 11:16:20 -04:00
parent 6fb56c5277
commit 2863587680
+1 -1
View File
@@ -132,7 +132,7 @@ declare module jsuri {
}
}
declare var Uri : jsuri.Uri;
declare type Uri = jsuri.Uri;
declare module 'jsuri' {
export = Uri;