chore: adds the return type for the extensions (#221)
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
This commit is contained in:
parent
850e893ca7
commit
5ab81641ae
|
@ -298,7 +298,7 @@ export class CloudEvent {
|
||||||
* @param {*} value the value of the extension attribute
|
* @param {*} value the value of the extension attribute
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
addExtension(key: string, value: any) {
|
addExtension(key: string, value: any): void {
|
||||||
this.spec.addExtension(key, value);
|
this.spec.addExtension(key, value);
|
||||||
this.extensions = { [key]: value, ...this.extensions };
|
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
|
* @see https://github.com/cloudevents/spec/blob/master/spec.md#extension-context-attributes
|
||||||
* @returns {Object} the extensions attributes - if none exist will will be {}
|
* @returns {Object} the extensions attributes - if none exist will will be {}
|
||||||
*/
|
*/
|
||||||
getExtensions() {
|
getExtensions(): object {
|
||||||
return this.extensions;
|
return this.extensions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue