diff --git a/Definitions/jquery-1.8.d.ts b/Definitions/jquery-1.8.d.ts index 549e683e9..597fbd065 100644 --- a/Definitions/jquery-1.8.d.ts +++ b/Definitions/jquery-1.8.d.ts @@ -1,3 +1,18 @@ +/* ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + // Typing for the jQuery library, version 1.7.x /* @@ -19,7 +34,7 @@ interface JQueryAjaxSettings { dataType?: string; error?(jqXHR: JQueryXHR, textStatus: string, errorThrow: string): any; global?: bool; - headers?: { [key: any]: any; }; + headers?: { [key: string]: any; }; ifModified?: bool; isLocal?: bool; jsonp?: string; @@ -28,7 +43,7 @@ interface JQueryAjaxSettings { password?: string; processData?: bool; scriptCharset?: string; - statusCode?: { [key: any]: any; }; + statusCode?: { [key: string]: any; }; success?(data: any, textStatus: string, jqXHR: JQueryXHR); timeout?: number; traditional?: bool; @@ -36,7 +51,7 @@ interface JQueryAjaxSettings { url?: string; username?: string; xhr?: any; - xhrFields?: { [key: any]: any; }; + xhrFields?: { [key: string]: any; }; } /* @@ -152,6 +167,7 @@ interface JQueryStatic { /**** AJAX *****/ + ajax(settings: JQueryAjaxSettings); ajax(url: string, settings: JQueryAjaxSettings); ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: any, jqXHR: JQueryXHR) => any): any; @@ -195,7 +211,7 @@ interface JQueryStatic { ****/ css(e: any, propertyName: string, value?: any); css(e: any, propertyName: any, value?: any); - cssHooks: { [key: any]: any; }; + cssHooks: { [key: string]: any; }; /**** DATA @@ -314,7 +330,7 @@ interface JQuery { attr(attributeName: string): string; attr(attributeName: string, value: any): JQuery; - attr(map: { [key: any]: any; }): JQuery; + attr(map: { [key: string]: any; }): JQuery; attr(attributeName: string, func: (index: any, attr: any) => any): JQuery; hasClass(className: string): bool; @@ -699,4 +715,4 @@ interface JQuery { } declare var jQuery: JQueryStatic; -declare var $: JQueryStatic; \ No newline at end of file +declare var $: JQueryStatic; diff --git a/Definitions/node-0.8.d.ts b/Definitions/node-0.8.d.ts index 09efec7bc..baae95cbe 100644 --- a/Definitions/node-0.8.d.ts +++ b/Definitions/node-0.8.d.ts @@ -772,10 +772,10 @@ declare module "fs" { export function writeSync(fd: string, buffer: NodeBuffer, offset: number, length: number, position: number): void; export function read(fd: string, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void): void; export function readSync(fd: string, buffer: NodeBuffer, offset: number, length: number, position: number): any[]; - export function readFile(filename: string, encoding: string, callback: (err: Error, data: NodeBuffer) => void ): void; + export function readFile(filename: string, encoding: string, callback: (err: Error, data: string) => void ): void; export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void ): void; export function readFileSync(filename: string): NodeBuffer; - export function readFileSync(filename: string, encoding: string): String; + export function readFileSync(filename: string, encoding: string): string; export function writeFile(filename: string, data: any, encoding?: string, callback?: Function): void; export function writeFileSync(filename: string, data: any, encoding?: string): void; export function appendFile(filename: string, data: any, encoding?: string, callback?: Function): void; @@ -922,10 +922,10 @@ declare module "crypto" { export interface Credentials { context?: any; } export function createCredentials(details: CredentialDetails): Credentials; export function createHash(algorithm: string): Hash; + export function createHmac(algorithm: string, key: string): Hmac; interface Hash { update(data: any, input_encoding?: string): void; - digest(encoding?: string): void; - createHmac(algorithm: string, key: string): Hmac; + digest(encoding?: string): string; } interface Hmac { update(data: any): void;