Skip to content

Commit

Permalink
chore: adds the return type for the extensions (cloudevents#221)
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
  • Loading branch information
lholmquist authored Jun 18, 2020
1 parent 850e893 commit 5ab8164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/cloudevent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand All @@ -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;
}
}

0 comments on commit 5ab8164

Please # to comment.