Declarations of common interfaces in lib.d.ts

Topics: General
Nov 18, 2012 at 2:53 PM
Edited Nov 18, 2012 at 2:57 PM

It's very nice that lib.d.ts now contains declarations for common interfaces but I think it'd be much more useful if you added prefixed functions from browsers other than Internet Explorer.

For example, the declaration for WindowAnimationTiming in lib.d.ts looks like this:

WindowAnimationTiming
{
    animationStartTime: number;
    msAnimationStartTime: number;
    msCancelRequestAnimationFrame(handle: number): void;
    cancelAnimationFrame(handle: number): void;
    requestAnimationFrame(callback: FrameRequestCallback): number;
    msRequestAnimationFrame(callback: FrameRequestCallback): number;
}

The definition of the same in RicoP's webgl.d.ts is more complete:

interface WindowAnimationTiming {
    requestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number;
    msRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number;
    mozRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number;
    webkitRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number;
    oRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number;	 

    cancelRequestAnimationFrame(handle: number): void;
    msCancelRequestAnimationFrame(handle: number): void;
    mozCancelRequestAnimationFrame(handle: number): void;
    webkitCancelRequestAnimationFrame(handle: number): void;
    oCancelRequestAnimationFrame(handle: number): void;
}
Coordinator
Nov 20, 2012 at 4:37 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.