I'm trying to pass a TouchEvent to a method using angular. When I define the event as TouchEvent, everything works in Chrome, but Firefox will throw a ReferenceError, "TouchEvent is not defined". When I define the event as window.TouchEvent, the event works with webpack-dev-server even though my editor highlights "window" as an error with, "Cannot find namespace 'window'". The major issue with this is that the window error prevents me from compiling my app using webpack.
My fix has been to pass in the TouchEvent as event:any, but if there's a better fix, I'd like to know. I'd also appreciate an understanding of why this is happening if someone knows. I'm using webpack2 and angular4. Thanks in advance.