UNPKG

typescript-closure-tools

Version:

Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files

122 lines (103 loc) 5.04 kB
/// <reference path="../../../globals.d.ts" /> /// <reference path="../debug/logger.d.ts" /> /// <reference path="../uri/uri.d.ts" /> /// <reference path="./xmlhttp.d.ts" /> declare module goog.net { class ChannelDebug extends ChannelDebug__Class { } /** Fake class which should be extended to avoid inheriting static properties */ class ChannelDebug__Class { /** * Logs and keeps a buffer of debugging info for the Channel. * * @constructor */ constructor(); /** * Gets the logger used by this ChannelDebug. * @return {goog.debug.Logger} The logger used by this ChannelDebug. */ getLogger(): goog.debug.Logger; /** * Logs that the browser went offline during the lifetime of a request. * @param {goog.Uri} url The URL being requested. */ browserOfflineResponse(url: goog.Uri): void; /** * Logs an XmlHttp request.. * @param {string} verb The request type (GET/POST). * @param {goog.Uri} uri The request destination. * @param {string|number|undefined} id The request id. * @param {number} attempt Which attempt # the request was. * @param {?string} postData The data posted in the request. */ xmlHttpChannelRequest(verb: string, uri: goog.Uri, id: string|number|any /*undefined*/, attempt: number, postData: string): void; /** * Logs the meta data received from an XmlHttp request. * @param {string} verb The request type (GET/POST). * @param {goog.Uri} uri The request destination. * @param {string|number|undefined} id The request id. * @param {number} attempt Which attempt # the request was. * @param {goog.net.XmlHttp.ReadyState} readyState The ready state. * @param {number} statusCode The HTTP status code. */ xmlHttpChannelResponseMetaData(verb: string, uri: goog.Uri, id: string|number|any /*undefined*/, attempt: number, readyState: goog.net.XmlHttp.ReadyState, statusCode: number): void; /** * Logs the response data received from an XmlHttp request. * @param {string|number|undefined} id The request id. * @param {?string} responseText The response text. * @param {?string=} opt_desc Optional request description. */ xmlHttpChannelResponseText(id: string|number|any /*undefined*/, responseText: string, opt_desc?: string): void; /** * Logs a Trident ActiveX request. * @param {string} verb The request type (GET/POST). * @param {goog.Uri} uri The request destination. * @param {string|number|undefined} id The request id. * @param {number} attempt Which attempt # the request was. */ tridentChannelRequest(verb: string, uri: goog.Uri, id: string|number|any /*undefined*/, attempt: number): void; /** * Logs the response text received from a Trident ActiveX request. * @param {string|number|undefined} id The request id. * @param {string} responseText The response text. */ tridentChannelResponseText(id: string|number|any /*undefined*/, responseText: string): void; /** * Logs the done response received from a Trident ActiveX request. * @param {string|number|undefined} id The request id. * @param {boolean} successful Whether the request was successful. */ tridentChannelResponseDone(id: string|number|any /*undefined*/, successful: boolean): void; /** * Logs a request timeout. * @param {goog.Uri} uri The uri that timed out. */ timeoutResponse(uri: goog.Uri): void; /** * Logs a debug message. * @param {string} text The message. */ debug(text: string): void; /** * Logs an exception * @param {Error} e The error or error event. * @param {string=} opt_msg The optional message, defaults to 'Exception'. */ dumpException(e: Error, opt_msg?: string): void; /** * Logs an info message. * @param {string} text The message. */ info(text: string): void; /** * Logs a warning message. * @param {string} text The message. */ warning(text: string): void; /** * Logs a severe message. * @param {string} text The message. */ severe(text: string): void; } }