File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,19 @@ export function parseTo(to: NavigateArg | undefined): {
140140 } ;
141141}
142142
143- function sanitizePressEvent ( evt : PressEvent ) : PressEvent {
144- const safeEvt : any = {
143+ interface SanitizedPressEvent {
144+ type ?: string ;
145+ pointerType ?: string ;
146+ shiftKey : boolean ;
147+ metaKey : boolean ;
148+ ctrlKey : boolean ;
149+ altKey : boolean ;
150+ // target is defined as a non-enumerable property below
151+ [ key : string ] : unknown ; // allow non-enumerable 'target'
152+ }
153+
154+ function sanitizePressEvent ( evt : PressEvent ) : SanitizedPressEvent {
155+ const safeEvt : SanitizedPressEvent = {
145156 type : ( evt as any ) ?. type ,
146157 pointerType : ( evt as any ) ?. pointerType ,
147158 shiftKey : ! ! ( evt as any ) ?. shiftKey ,
You can’t perform that action at this time.
0 commit comments