Skip to content

Commit 2863587

Browse files
committed
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.
1 parent 6fb56c5 commit 2863587

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsuri/jsuri.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ declare module jsuri {
132132
}
133133
}
134134

135-
declare var Uri : jsuri.Uri;
135+
declare type Uri = jsuri.Uri;
136136

137137
declare module 'jsuri' {
138138
export = Uri;

0 commit comments

Comments
 (0)