mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-23 12:57:25 +08:00
Merge pull request #14353 from daberni/jsnlog_serialize
jsnlog: added serialize to JSNLogOptions
This commit is contained in:
7
jsnlog/index.d.ts
vendored
7
jsnlog/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for JSNLog 2.17.3
|
||||
// Type definitions for JSNLog 2.17
|
||||
// Project: https://github.com/mperdeck/jsnlog.js
|
||||
// Definitions by: Mattijs Perdeck <https://github.com/mperdeck>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -8,7 +8,7 @@
|
||||
// http://jsnlog.com
|
||||
// -------------------------------
|
||||
|
||||
/**
|
||||
/**
|
||||
* Copyright 2016 Mattijs Perdeck.
|
||||
*
|
||||
* This project is licensed under the MIT license.
|
||||
@@ -33,6 +33,7 @@ declare namespace JL {
|
||||
clientIP?: string;
|
||||
requestId?: string;
|
||||
defaultBeforeSend?: (xhr: XMLHttpRequest) => void;
|
||||
serialize?: (obj: any) => string;
|
||||
}
|
||||
|
||||
interface JSNLogFilterOptions {
|
||||
@@ -87,7 +88,7 @@ declare namespace JL {
|
||||
|
||||
declare function __jsnlog_configure(jsnlog: any): void;
|
||||
|
||||
|
||||
|
||||
// Ambient declaration of the JL function itself
|
||||
declare function JL(loggerName?: string): JL.JSNLogLogger;
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ JL.setOptions({
|
||||
defaultAjaxUrl: '/jsnlog.logger',
|
||||
clientIP: '0.0.0.0',
|
||||
requestId: 'a reuest id',
|
||||
defaultBeforeSend: null
|
||||
defaultBeforeSend: null,
|
||||
serialize: (obj) => JSON.stringify(obj)
|
||||
});
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
6
jsnlog/tslint.json
Normal file
6
jsnlog/tslint.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "../tslint.json",
|
||||
"rules": {
|
||||
"no-empty-interface": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user