Since TypeScript 3.7.7, TouchEvent is supported in lib.dom.d, see TouchEvent It's still worth going to the Touch Events W3C specification to more fully understand the TypeScript declarations.
Original Answer:
thank you for the advice. I went to the Touch Events Specification W3C Working Draft 05 May 2011 and created a set of ambient declarations from that. There is a more recent candidate recommendation, but this is what I think is actually implemented in most browsers. This seems to work well.
PS: the declare var TouchEvent at the bottom is not part of the w3c draft. It is an adaptation of the same code for UIEvent that is part of the standard interfaces shipped with TypeScript.
interface Touch {
identifier:number;
target:EventTarget;
screenX:number;
screenY:number;
clientX:number;
clientY:number;
pageX:number;
pageY:number;
};
interface TouchList {
length:number;
item (index:number):Touch;
identifiedTouch(identifier:number):Touch;
};
interface TouchEvent extends UIEvent {
touches:TouchList;
targetTouches:TouchList;
changedTouches:TouchList;
altKey:bool;
metaKey:bool;
ctrlKey:bool;
shiftKey:bool;
initTouchEvent (type:string, canBubble:bool, cancelable:bool, view:AbstractView, detail:number, ctrlKey:bool, altKey:bool, shiftKey:bool, metaKey:bool, touches:TouchList, targetTouches:TouchList, changedTouches:TouchList);
};
declare var TouchEvent: {
prototype: TouchEvent;
new(): TouchEvent;
}