diff --git a/jsnlog/index.d.ts b/jsnlog/index.d.ts index 4b525c75af..e252d5cf36 100644 --- a/jsnlog/index.d.ts +++ b/jsnlog/index.d.ts @@ -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 // 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; diff --git a/jsnlog/jsnlog-tests.ts b/jsnlog/jsnlog-tests.ts index db2b2a2523..64078fbd58 100644 --- a/jsnlog/jsnlog-tests.ts +++ b/jsnlog/jsnlog-tests.ts @@ -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) }); // ---------------------------------------------------------- diff --git a/jsnlog/tslint.json b/jsnlog/tslint.json new file mode 100644 index 0000000000..9bc375c06b --- /dev/null +++ b/jsnlog/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "no-empty-interface": false + } +} \ No newline at end of file