diff --git a/modules/mod-Publish-And-Subscribe-System/type/interfaces.ts b/modules/mod-Publish-And-Subscribe-System/type/interfaces.ts index ded9b6e..86f5e29 100644 --- a/modules/mod-Publish-And-Subscribe-System/type/interfaces.ts +++ b/modules/mod-Publish-And-Subscribe-System/type/interfaces.ts @@ -291,7 +291,7 @@ export interface ITopicMatcher { export type observableCallback = (content: T | null, sender: string, timeStamp: number | null, ...data) => void; export type waitForCallback = (content?: T | null, sender?: string, timeStamp?: number | null, ...data) => boolean | Promise; -export interface IObservable { +export interface IObservable { /** * The ID of the Observable @@ -303,23 +303,20 @@ export interface IObservable { */ type: 'observable'; - - /** - * Element containing the value. - */ - value: T | null; - _value: T | null; /** * Stores the specified Setter internally */ - setter: ((value: T | null, sender: string | null, timeStamp: number | null, ...data) => T | null) | null; + setter: ((value: S | null, sender: string | null, timeStamp: number | null, ...data) => { + data: T | null, + valid: boolean, + }) | null; /** * Stores the specified Getter */ - getter: ((value: T | null) => T | null) | null; + getter: ((value: T | null) => G | null) | null; /** * Function to Set the Value. @@ -328,12 +325,12 @@ export interface IObservable { * @param timeStamp A Timestamp which could be provided * @param data Additional Data */ - setContent(value: T | null, sender?: string | null, timeStamp?: number | null, ...data): void; + setContent(value: S | null, sender?: string | null, timeStamp?: number | null, ...data): void; /** * A Default Getter, to get the coresponding Value. */ - getContent(): T | null; + getContent(): G | null; /** * Creates a Subscription for the value of the Observable @@ -356,14 +353,14 @@ export interface IObservable { * @param testCallback Function which implements the Condition to Pass * @param options Additional Options. */ - waitFor(testCallback: waitForCallback, options?: IWaitForOpitions): Promise; + waitFor(testCallback: waitForCallback, options?: IWaitForOpitions): Promise; /** * Function to wait for an Update of the Data. * @param mode The mode * @param options Additional Options */ - waitForUpdate(mode?: 'sync' | 'async', options?: ISubscriptionOptions): Promise; + waitForUpdate(mode?: 'sync' | 'async', options?: ISubscriptionOptions): Promise; /** * Forces Publishing an Update @@ -389,11 +386,9 @@ export interface IObservable { */ options: any; - subscriptions: Set>; - dispose(): void; - observable: nopeObservable; + observable: nopeObservable; } /**