From 5ab81641aeaa7ef2d5dc23265277c65be144a881 Mon Sep 17 00:00:00 2001 From: Lucas Holmquist Date: Thu, 18 Jun 2020 17:12:54 -0400 Subject: [PATCH] chore: adds the return type for the extensions (#221) 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 6a1febc..7a34cce 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; } }