File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ declare global {
182182 svgIconHash : string ;
183183 svgIconPath : string ;
184184 } ;
185+
185186 const comments : {
186187 uiForPost ( comments : JQuery ) : {
187188 addShow ( value1 : boolean , value2 : boolean ) : void ;
@@ -193,6 +194,12 @@ declare global {
193194 ) : void ;
194195 } ;
195196 } ;
197+
198+ const question : {
199+ getQuestionId ( ) : number ;
200+ canViewVoteCounts ( ) : boolean ;
201+ scrollToPost ( postId : number ) : boolean ;
202+ } ;
196203 }
197204}
198205
Original file line number Diff line number Diff line change @@ -17,3 +17,15 @@ StackExchange.helpers.isInNetwork("stackoverflow.com");
1717
1818// $ExpectError
1919StackExchange . helpers . isInNetwork ( ) ;
20+
21+ // $ExpectType number
22+ StackExchange . question . getQuestionId ( ) ;
23+
24+ // $ExpectType boolean
25+ StackExchange . question . canViewVoteCounts ( ) ;
26+
27+ // $ExpectError
28+ StackExchange . question . scrollToPost ( ) ;
29+
30+ // $ExpectType boolean
31+ StackExchange . question . scrollToPost ( 123456 ) ;
You can’t perform that action at this time.
0 commit comments