mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Fix on extend method and others for compatibility with Knockout 3
This commit is contained in:
Vendored
+12
@@ -74,6 +74,7 @@ interface KnockoutComputed<T> extends KnockoutSubscribable<T>, KnockoutComputedF
|
||||
dispose(): void;
|
||||
isActive(): boolean;
|
||||
getDependenciesCount(): number;
|
||||
extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed<T>;
|
||||
}
|
||||
|
||||
interface KnockoutObservableArrayStatic {
|
||||
@@ -83,6 +84,7 @@ interface KnockoutObservableArrayStatic {
|
||||
}
|
||||
|
||||
interface KnockoutObservableArray<T> extends KnockoutObservable<T[]>, KnockoutObservableArrayFunctions<T> {
|
||||
extend(requestedExtenders: { [key: string]: any; }): KnockoutObservableArray<T>;
|
||||
}
|
||||
|
||||
interface KnockoutObservableStatic {
|
||||
@@ -95,6 +97,7 @@ interface KnockoutObservable<T> extends KnockoutSubscribable<T>, KnockoutObserva
|
||||
peek(): T;
|
||||
valueHasMutated(): void;
|
||||
valueWillMutate(): void;
|
||||
extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable<T>;
|
||||
}
|
||||
|
||||
interface KnockoutComputedDefine<T> {
|
||||
@@ -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<T>(a: T[], b: T[]): Array<KnockoutArrayChange<T>>;
|
||||
|
||||
arrayForEach<T>(array: T[], action: (item: T) => void): void;
|
||||
|
||||
arrayForEach(array: any[], action: (any) => void ): void;
|
||||
@@ -328,6 +334,12 @@ interface KnockoutUtils {
|
||||
isIe7: boolean;
|
||||
}
|
||||
|
||||
interface KnockoutArrayChange<T> {
|
||||
status: string;
|
||||
value: T;
|
||||
index: number;
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
// templateSources.js
|
||||
//////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user