Interface KnockoutObservable

Hierarchy

Index

Call signatures

Properties

Methods

Call signatures

(): T in KnockoutObservable<T>

Returns

T in KnockoutObservable<T>

(value: T in KnockoutObservable<T>)

Parameters

  • value: T in KnockoutObservable<T>

Properties

optional public valueHasMutated?: () => void

()

optional public valueWillMutate?: () => void

()

Methods

public equalityComparer(a: any, b: any): boolean

Parameters

  • a: any
  • b: any

Returns

boolean

public equalityComparer(a: any, b: any): boolean

Parameters

  • a: any
  • b: any

Returns

boolean

public extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable

Parameters

  • requestedExtenders: { [key: string]: any; }

Returns

KnockoutObservable

public getSubscriptionsCount(): number

Returns

number

public getSubscriptionsCount(): number

Returns

number

public notifySubscribers(valueToWrite?: T in KnockoutSubscribableFunctions<T>, event?: string)

Parameters

  • valueToWrite?: T in KnockoutSubscribableFunctions<T> optional
  • event?: string optional

public notifySubscribers(valueToWrite?: T in KnockoutSubscribableFunctions<T>, event?: string)

Parameters

  • valueToWrite?: T in KnockoutSubscribableFunctions<T> optional
  • event?: string optional

public peek(): T in KnockoutObservable<T>

Returns

T in KnockoutObservable<T>

public publishOn(topic: string, skipInitialPublish?: boolean, equalityComparer?: (newValue: T, oldValue: T) => boolean): KnockoutObservable

Parameters

  • topic: string
  • skipInitialPublish?: boolean optional
  • equalityComparer?: (newValue: T, oldValue: T) => boolean optional

Returns

KnockoutObservable

public stopPublishingOn(topic: string): KnockoutObservable

Parameters

  • topic: string

Returns

KnockoutObservable

public subscribe(callback: (newValue: T) => void, target?: any, event?: string): KnockoutSubscription

Parameters

  • callback: (newValue: T) => void
  • target?: any optional
  • event?: string optional

Returns

KnockoutSubscription

public subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription

Parameters

  • callback: (newValue: TEvent) => void
  • target: any
  • event: string

Returns

KnockoutSubscription

public subscribe(callback: (newValue: T) => void, target?: any, event?: string): KnockoutSubscription

Parameters

  • callback: (newValue: T) => void
  • target?: any optional
  • event?: string optional

Returns

KnockoutSubscription

public subscribe(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription

Parameters

  • callback: (newValue: TEvent) => void
  • target: any
  • event: string

Returns

KnockoutSubscription

public subscribeTo(topic: string, useLastPublishedValueToInitialize?: boolean, transform?: (val: any) => T): KnockoutObservable

Parameters

  • topic: string
  • useLastPublishedValueToInitialize?: boolean optional
  • transform?: (val: any) => T optional

Returns

KnockoutObservable

public syncWith(topic: string, initializeWithLatestValue?: boolean, skipInitialPublish?: boolean, equalityComparer?: (newValue: T, oldValue: T) => boolean): KnockoutObservable

Parameters

  • topic: string
  • initializeWithLatestValue?: boolean optional
  • skipInitialPublish?: boolean optional
  • equalityComparer?: (newValue: T, oldValue: T) => boolean optional

Returns

KnockoutObservable

public unsubscribeFrom(topic: string): KnockoutObservable

Parameters

  • topic: string

Returns

KnockoutObservable