diff --git a/packages/core/src/exposed-thing.ts b/packages/core/src/exposed-thing.ts index 1b67a1560..81eca8525 100644 --- a/packages/core/src/exposed-thing.ts +++ b/packages/core/src/exposed-thing.ts @@ -607,7 +607,7 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing { public async handleObserveProperty( name: string, listener: ContentListener, - options?: WoT.InteractionOptions & { formIndex: number } + options: WoT.InteractionOptions & { formIndex: number } ): Promise { if (this.properties[name]) { Helpers.validateInteractionOptions(this, this.properties[name], options); @@ -615,7 +615,7 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing { this.properties[name], "property", "observeproperty", - options?.formIndex + options.formIndex ); if (formIndex !== -1) { @@ -639,7 +639,7 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing { public handleUnobserveProperty( name: string, listener: ContentListener, - options?: WoT.InteractionOptions & { formIndex: number } + options: WoT.InteractionOptions & { formIndex: number } ): void { if (this.properties[name]) { Helpers.validateInteractionOptions(this, this.properties[name], options); @@ -647,7 +647,7 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing { this.properties[name], "property", "unobserveproperty", - options?.formIndex + options.formIndex ); if (formIndex !== -1) {