From df35d6b81b86b878dafb6031c304e8bfa069b841 Mon Sep 17 00:00:00 2001 From: eudaimos Date: Mon, 12 Aug 2019 18:09:58 -0700 Subject: [PATCH] fix(fluent): channel & Transponder in utils was not returning this for fluent chaining of handlers l affects: @tao.js/utils --- packages/tao-utils/src/Channel.js | 6 ++++++ packages/tao-utils/src/Transponder.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/tao-utils/src/Channel.js b/packages/tao-utils/src/Channel.js index ee50ee9..ee3f37d 100644 --- a/packages/tao-utils/src/Channel.js +++ b/packages/tao-utils/src/Channel.js @@ -80,16 +80,19 @@ export default class Channel { { t, term, a, action, o, orient }, handler ); + return this; } addAsyncHandler({ t, term, a, action, o, orient }, handler) { // this._kernel.addAsyncHandler({ t, term, a, action, o, orient }, handler); this._channel.addAsyncHandler({ t, term, a, action, o, orient }, handler); + return this; } addInlineHandler({ t, term, a, action, o, orient }, handler) { // this._kernel.addInlineHandler({ t, term, a, action, o, orient }, handler); this._channel.addInlineHandler({ t, term, a, action, o, orient }, handler); + return this; } removeInterceptHandler({ t, term, a, action, o, orient }, handler) { @@ -98,6 +101,7 @@ export default class Channel { { t, term, a, action, o, orient }, handler ); + return this; } removeAsyncHandler({ t, term, a, action, o, orient }, handler) { @@ -106,6 +110,7 @@ export default class Channel { { t, term, a, action, o, orient }, handler ); + return this; } removeInlineHandler({ t, term, a, action, o, orient }, handler) { @@ -114,6 +119,7 @@ export default class Channel { { t, term, a, action, o, orient }, handler ); + return this; } bridgeFrom(TAO, ...trigrams) { diff --git a/packages/tao-utils/src/Transponder.js b/packages/tao-utils/src/Transponder.js index 70d16a1..50092fb 100644 --- a/packages/tao-utils/src/Transponder.js +++ b/packages/tao-utils/src/Transponder.js @@ -123,14 +123,17 @@ export default class Transponder { { t, term, a, action, o, orient }, handler ); + return this; } addAsyncHandler({ t, term, a, action, o, orient }, handler) { this._channel.addAsyncHandler({ t, term, a, action, o, orient }, handler); + return this; } addInlineHandler({ t, term, a, action, o, orient }, handler) { this._channel.addInlineHandler({ t, term, a, action, o, orient }, handler); + return this; } removeInterceptHandler({ t, term, a, action, o, orient }, handler) { @@ -138,6 +141,7 @@ export default class Transponder { { t, term, a, action, o, orient }, handler ); + return this; } removeAsyncHandler({ t, term, a, action, o, orient }, handler) { @@ -145,6 +149,7 @@ export default class Transponder { { t, term, a, action, o, orient }, handler ); + return this; } removeInlineHandler({ t, term, a, action, o, orient }, handler) { @@ -152,5 +157,6 @@ export default class Transponder { { t, term, a, action, o, orient }, handler ); + return this; } }