From 506ff3b5a0a525892ef05bbb9406a3855049aa17 Mon Sep 17 00:00:00 2001 From: daberni Date: Tue, 31 Jan 2017 10:11:19 +0100 Subject: [PATCH 1/3] added serialize to JSNLogOptions see http://jsnlog.com/Documentation/JSNLogJs/JL/SetOptions#serialize --- jsnlog/index.d.ts | 3 ++- jsnlog/jsnlog-tests.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jsnlog/index.d.ts b/jsnlog/index.d.ts index 4b525c75af..012534a7ac 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.4 // Project: https://github.com/mperdeck/jsnlog.js // Definitions by: Mattijs Perdeck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -33,6 +33,7 @@ declare namespace JL { clientIP?: string; requestId?: string; defaultBeforeSend?: (xhr: XMLHttpRequest) => void; + serialize?: (obj: any) => string; } interface JSNLogFilterOptions { 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) }); // ---------------------------------------------------------- From c401e51c1ff6a2bb982323da5cc94903e5702166 Mon Sep 17 00:00:00 2001 From: Bernhard Danecker Date: Wed, 1 Feb 2017 11:42:25 +0100 Subject: [PATCH 2/3] changes according to comment --- jsnlog/index.d.ts | 2 +- jsnlog/tslint.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 jsnlog/tslint.json diff --git a/jsnlog/index.d.ts b/jsnlog/index.d.ts index 012534a7ac..dcf6d10c74 100644 --- a/jsnlog/index.d.ts +++ b/jsnlog/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for JSNLog 2.17.4 +// Type definitions for JSNLog 2.17 // Project: https://github.com/mperdeck/jsnlog.js // Definitions by: Mattijs Perdeck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/jsnlog/tslint.json b/jsnlog/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/jsnlog/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } From f1b881f1b6688ef4e6dc76f7f2b40d3a0fce579e Mon Sep 17 00:00:00 2001 From: Bernhard Danecker Date: Wed, 1 Feb 2017 19:28:34 +0100 Subject: [PATCH 3/3] allow empty interfaces --- jsnlog/index.d.ts | 4 ++-- jsnlog/tslint.json | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/jsnlog/index.d.ts b/jsnlog/index.d.ts index dcf6d10c74..e252d5cf36 100644 --- a/jsnlog/index.d.ts +++ b/jsnlog/index.d.ts @@ -8,7 +8,7 @@ // http://jsnlog.com // ------------------------------- -/** +/** * Copyright 2016 Mattijs Perdeck. * * This project is licensed under the MIT license. @@ -88,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/tslint.json b/jsnlog/tslint.json index 377cc837d4..9bc375c06b 100644 --- a/jsnlog/tslint.json +++ b/jsnlog/tslint.json @@ -1 +1,6 @@ -{ "extends": "../tslint.json" } +{ + "extends": "../tslint.json", + "rules": { + "no-empty-interface": false + } +} \ No newline at end of file