Add method to Array in TypeScript 1.0
问题 I'm trying to create a TypeScript 1.0.2 (VS 2013 Update 2 RTM) definition file for the ASP.NET Ajax library, and I'm getting hung up on how to define the additional methods that MS Ajax adds to base JS types such as Array. I created a AspNetAjax.d.ts and a AspNetAjax-tests.ts file. When I attempt to use the "add" method in the test file, I get the compiler error that is listed below. AspNetAjax.d.ts interface Array<T> { add(array: T[], item: T): void; } AspNetAjax-tests.ts ///<reference path=