diff --git a/knockout.postbox/knockout-postbox.d.ts b/knockout.postbox/knockout-postbox.d.ts index 3e66988510..daa35458ab 100644 --- a/knockout.postbox/knockout-postbox.d.ts +++ b/knockout.postbox/knockout-postbox.d.ts @@ -19,6 +19,14 @@ interface KnockoutObservable { syncWith(topic: string, initializeWithLatestValue?: boolean, skipInitialPublish?: boolean, equalityComparer?: (newValue: T, oldValue: T) => boolean): KnockoutObservable; } +interface KnockoutObservableArray { + subscribeTo(topic: string, useLastPublishedValueToInitialize?: boolean, transform?: (val: any) => T): KnockoutObservableArray; + unsubscribeFrom(topic: string): KnockoutObservableArray; + publishOn(topic: string, skipInitialPublish?: boolean, equalityComparer?: (newValue: T, oldValue: T) => boolean): KnockoutObservableArray; + stopPublishingOn(topic: string): KnockoutObservableArray; + syncWith(topic: string, initializeWithLatestValue?: boolean, skipInitialPublish?: boolean, equalityComparer?: (newValue: T, oldValue: T) => boolean): KnockoutObservableArray; +} + interface KnockoutStatic { postbox: KnockoutPostBox; } \ No newline at end of file diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 63f9938943..03240484cc 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -74,6 +74,7 @@ interface KnockoutComputed extends KnockoutSubscribable, KnockoutComputedF dispose(): void; isActive(): boolean; getDependenciesCount(): number; + extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed; } interface KnockoutObservableArrayStatic { @@ -83,6 +84,7 @@ interface KnockoutObservableArrayStatic { } interface KnockoutObservableArray extends KnockoutObservable, KnockoutObservableArrayFunctions { + extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray; } interface KnockoutObservableStatic { @@ -95,6 +97,7 @@ interface KnockoutObservable extends KnockoutSubscribable, KnockoutObserva peek(): T; valueHasMutated(): void; valueWillMutate(): void; + extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable; } interface KnockoutComputedDefine { @@ -116,6 +119,7 @@ interface KnockoutBindingContext { extend(any): any; createChildContext(any): any; + createChildContext(a: any, b: any, c: Function): any; } interface KnockoutBindingHandler { @@ -233,6 +237,8 @@ interface KnockoutUtils { fieldsIncludedWithJsonPost: any[]; + compareArrays(a: T[], b: T[]): Array>; + arrayForEach(array: T[], action: (item: T) => void): void; arrayForEach(array: any[], action: (any) => void ): void; @@ -328,6 +334,12 @@ interface KnockoutUtils { isIe7: boolean; } +interface KnockoutArrayChange { + status: string; + value: T; + index: number; +} + ////////////////////////////////// // templateSources.js //////////////////////////////////