mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Update Knockout.d.ts
update `objectForEach` to include key value add `addOrRemoveItem` consolidate `arrayPushAll` into one line using the `|` operator enabling `setTextContent` IT's PART OF THE MINIFIED API SURFACE https://github.com/knockout/knockout/blob/master/src/utils.js#L599
This commit is contained in:
parent
fd7aa0a879
commit
215df3cd35
14
knockout/knockout.d.ts
vendored
14
knockout/knockout.d.ts
vendored
@ -275,9 +275,7 @@ interface KnockoutUtils {
|
||||
|
||||
arrayFilter<T>(array: T[], predicate: (item: T) => boolean): T[];
|
||||
|
||||
arrayPushAll<T>(array: T[], valuesToPush: T[]): T[];
|
||||
|
||||
arrayPushAll<T>(array: KnockoutObservableArray<T>, valuesToPush: T[]): T[];
|
||||
arrayPushAll<T>(array: T[] | KnockoutObservableArray<T>, valuesToPush: T[]): T[];
|
||||
|
||||
extend(target: Object, source: Object): Object;
|
||||
|
||||
@ -313,8 +311,8 @@ interface KnockoutUtils {
|
||||
|
||||
toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: boolean): void;
|
||||
|
||||
//setTextContent(element: any, textContent: string): void; // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670
|
||||
|
||||
setTextContent(element: any, textContent: string | KnockoutObservable<string>): void; // IT's PART OF THE MINIFIED API SURFACE https://github.com/knockout/knockout/blob/master/src/utils.js#L599
|
||||
|
||||
setElementName(element: any, name: string): void;
|
||||
|
||||
forceRefresh(node: any): void;
|
||||
@ -339,9 +337,9 @@ interface KnockoutUtils {
|
||||
|
||||
isIe7: boolean;
|
||||
|
||||
objectForEach(obj: any, action: Function): void;
|
||||
|
||||
setPrototypeOf(obj: any, proto: any): void;
|
||||
objectForEach(obj: any, action: (key: any, value: any) => void): void;
|
||||
|
||||
addOrRemoveItem<T>(array: T[] | KnockoutObservable<T>, value: T, included: T): void;
|
||||
}
|
||||
|
||||
interface KnockoutArrayChange<T> {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user