forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.clientSideLogging.d.ts
30 lines (26 loc) · 1.65 KB
/
jquery.clientSideLogging.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Type definitions for jquery.clientSideLogging
// Project: https://github.com/remybach/jQuery.clientSideLogging
// Definitions by: Diullei Gomes <https://github.com/diullei>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
interface ClientSideLoggingClientInfoObject {
location?: boolean; // The url to the page on which the error occurred.
screen_size?: boolean; // The size of the user's screen (different to the window size because the window might not be maximized)
user_agent?: boolean; // The user agent string.
window_size?: boolean; // The window size.
}
interface ClientSideLoggingObject {
error_url?: string; // The url to which errors logs are sent
info_url?: string; // The url to which info logs are sent
log_url?: string; // The url to which standard logs are sent
log_level?: number; // The level at which to log. This allows you to keep the calls to the logging in your code and just change this variable to log varying degrees. 1 = only error, 2 = error & log, 3 = error, log & info
native_error?: boolean; // Whether or not to send native js errors as well (using window.onerror).
hijack_console?: boolean; // Hijacks the default console functionality (ie: all your console.error/info/log are belong to us).
query_var?: string; // The variable to send the log message through as.
client_info?: ClientSideLoggingClientInfoObject; // Configuration for what info about the client's browser is logged.
}
interface JQueryStatic {
info: (what?: any) => any;
log: (what?: any) => any;
clientSideLogging: (options: ClientSideLoggingObject) => any;
}