From fc407cb7023a85d4c4f87d142e3ef800cd3e3f3f Mon Sep 17 00:00:00 2001 From: Lucas Holmquist Date: Thu, 11 Jun 2020 11:48:15 -0400 Subject: [PATCH] chore: adds the return type for the extensions Signed-off-by: Lucas Holmquist --- src/lib/cloudevent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/cloudevent.ts b/src/lib/cloudevent.ts index 6a1febc6..7a34cce6 100644 --- a/src/lib/cloudevent.ts +++ b/src/lib/cloudevent.ts @@ -298,7 +298,7 @@ export class CloudEvent { * @param {*} value the value of the extension attribute * @returns {void} */ - addExtension(key: string, value: any) { + addExtension(key: string, value: any): void { this.spec.addExtension(key, value); this.extensions = { [key]: value, ...this.extensions }; } @@ -308,7 +308,7 @@ export class CloudEvent { * @see https://github.com/cloudevents/spec/blob/master/spec.md#extension-context-attributes * @returns {Object} the extensions attributes - if none exist will will be {} */ - getExtensions() { + getExtensions(): object { return this.extensions; } }