@types/knockout
Advanced tools
Comparing version 3.4.41 to 3.4.42
@@ -7,19 +7,18 @@ // Type definitions for Knockout v3.4.0 | ||
interface KnockoutSubscribableFunctions<T> { | ||
[key: string]: KnockoutBindingHandler | undefined; | ||
interface KnockoutExtensionFunctions { | ||
[key: string]: any; | ||
} | ||
notifySubscribers(valueToWrite?: T, event?: string): void; | ||
interface KnockoutSubscribableFunctions<T> extends KnockoutExtensionFunctions { | ||
notifySubscribers(valueToWrite?: T, event?: string): void; | ||
} | ||
interface KnockoutComputedFunctions<T> { | ||
[key: string]: KnockoutBindingHandler | undefined; | ||
interface KnockoutComputedFunctions<T> extends KnockoutExtensionFunctions { | ||
} | ||
interface KnockoutObservableFunctions<T> { | ||
[key: string]: KnockoutBindingHandler | undefined; | ||
equalityComparer(a: any, b: any): boolean; | ||
interface KnockoutObservableFunctions<T> extends KnockoutExtensionFunctions { | ||
equalityComparer(a: any, b: any): boolean; | ||
} | ||
interface KnockoutObservableArrayFunctions<T> { | ||
interface KnockoutObservableArrayFunctions<T> extends KnockoutExtensionFunctions { | ||
// General Array functions | ||
@@ -39,4 +38,2 @@ indexOf(searchElement: T, fromIndex?: number): number; | ||
// Ko specific | ||
[key: string]: KnockoutBindingHandler | undefined; | ||
replace(oldItem: T, newItem: T): void; | ||
@@ -62,3 +59,3 @@ | ||
interface KnockoutSubscription { | ||
dispose(): void; | ||
dispose(): void; | ||
} | ||
@@ -68,7 +65,7 @@ | ||
subscribe(callback: (newValue: T) => void, target: any, event: "beforeChange"): KnockoutSubscription; | ||
subscribe(callback: (newValue: T) => void, target?: any, event?: "change"): KnockoutSubscription; | ||
subscribe<TEvent>(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription; | ||
subscribe(callback: (newValue: T) => void, target?: any, event?: "change"): KnockoutSubscription; | ||
subscribe<TEvent>(callback: (newValue: TEvent) => void, target: any, event: string): KnockoutSubscription; | ||
extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable<T>; | ||
getSubscriptionsCount(): number; | ||
extend(requestedExtenders: { [key: string]: any; }): KnockoutSubscribable<T>; | ||
getSubscriptionsCount(): number; | ||
} | ||
@@ -85,7 +82,7 @@ | ||
interface KnockoutComputed<T> extends KnockoutObservable<T>, KnockoutComputedFunctions<T> { | ||
fn: KnockoutComputedFunctions<any>; | ||
fn: KnockoutComputedFunctions<any>; | ||
dispose(): void; | ||
isActive(): boolean; | ||
getDependenciesCount(): number; | ||
dispose(): void; | ||
isActive(): boolean; | ||
getDependenciesCount(): number; | ||
extend(requestedExtenders: { [key: string]: any; }): KnockoutComputed<T>; | ||
@@ -116,8 +113,8 @@ } | ||
interface KnockoutObservable<T> extends KnockoutSubscribable<T>, KnockoutObservableFunctions<T> { | ||
(): T; | ||
(value: T | null): void; | ||
(): T; | ||
(value: T | null): void; | ||
peek(): T; | ||
valueHasMutated?:{(): void;}; | ||
valueWillMutate?:{(): void;}; | ||
peek(): T; | ||
valueHasMutated?:{(): void;}; | ||
valueWillMutate?:{(): void;}; | ||
extend(requestedExtenders: { [key: string]: any; }): KnockoutObservable<T>; | ||
@@ -127,9 +124,9 @@ } | ||
interface KnockoutComputedDefine<T> { | ||
read(): T; | ||
write? (value: T): void; | ||
disposeWhenNodeIsRemoved?: Node; | ||
disposeWhen? (): boolean; | ||
owner?: any; | ||
deferEvaluation?: boolean; | ||
pure?: boolean; | ||
read(): T; | ||
write? (value: T): void; | ||
disposeWhenNodeIsRemoved?: Node; | ||
disposeWhen? (): boolean; | ||
owner?: any; | ||
deferEvaluation?: boolean; | ||
pure?: boolean; | ||
} | ||
@@ -199,6 +196,6 @@ | ||
// Rendering templates | ||
template: KnockoutBindingHandler; | ||
template: KnockoutBindingHandler; | ||
// Components (new for v3.2) | ||
component: KnockoutBindingHandler; | ||
// Components (new for v3.2) | ||
component: KnockoutBindingHandler; | ||
} | ||
@@ -228,8 +225,8 @@ | ||
throttle(target: any, timeout: number): KnockoutComputed<any>; | ||
notify(target: any, notifyWhen: string): any; | ||
notify(target: any, notifyWhen: string): any; | ||
rateLimit(target: any, timeout: number): any; | ||
rateLimit(target: any, options: { timeout: number; method?: string; }): any; | ||
rateLimit(target: any, timeout: number): any; | ||
rateLimit(target: any, options: { timeout: number; method?: string; }): any; | ||
trackArrayChanges(target: any): any; | ||
trackArrayChanges(target: any): any; | ||
} | ||
@@ -364,4 +361,4 @@ | ||
interface KnockoutTemplateAnonymous extends KnockoutTemplateSourcesDomElement { | ||
nodes(): any; | ||
nodes(value: any): void; | ||
nodes(): any; | ||
nodes(value: any): void; | ||
} | ||
@@ -372,9 +369,9 @@ | ||
domElement: { | ||
prototype: KnockoutTemplateSourcesDomElement | ||
new (element: Element): KnockoutTemplateSourcesDomElement | ||
prototype: KnockoutTemplateSourcesDomElement | ||
new (element: Element): KnockoutTemplateSourcesDomElement | ||
}; | ||
anonymousTemplate: { | ||
prototype: KnockoutTemplateAnonymous; | ||
new (element: Element): KnockoutTemplateAnonymous; | ||
prototype: KnockoutTemplateAnonymous; | ||
new (element: Element): KnockoutTemplateAnonymous; | ||
}; | ||
@@ -426,4 +423,4 @@ } | ||
bindingHandlers: KnockoutBindingHandlers; | ||
getBindingHandler(handler: string): KnockoutBindingHandler; | ||
bindingHandlers: KnockoutBindingHandlers; | ||
getBindingHandler(handler: string): KnockoutBindingHandler; | ||
@@ -434,7 +431,7 @@ virtualElements: KnockoutVirtualElements; | ||
applyBindings(viewModelOrBindingContext?: any, rootNode?: any): void; | ||
applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: {}, viewModel: any): void; | ||
applyBindingsToDescendants(viewModelOrBindingContext: any, rootNode: any): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, bindingContext: KnockoutBindingContext): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: {}, bindingContext: KnockoutBindingContext): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: (bindingContext: KnockoutBindingContext, node: Node) => {}, viewModel: any): void; | ||
applyBindingAccessorsToNode(node: Node, bindings: {}, viewModel: any): void; | ||
applyBindingsToNode(node: Node, bindings: any, viewModelOrBindingContext?: any): any; | ||
@@ -445,5 +442,5 @@ | ||
computed: KnockoutComputedStatic; | ||
pureComputed<T>(evaluatorFunction: () => T, context?: any): KnockoutComputed<T>; | ||
pureComputed<T>(options: KnockoutComputedDefine<T>, context?: any): KnockoutComputed<T>; | ||
computed: KnockoutComputedStatic; | ||
pureComputed<T>(evaluatorFunction: () => T, context?: any): KnockoutComputed<T>; | ||
pureComputed<T>(options: KnockoutComputedDefine<T>, context?: any): KnockoutComputed<T>; | ||
@@ -464,5 +461,5 @@ observableArray: KnockoutObservableArrayStatic; | ||
renderTemplate(template: string, viewModel: any, options?: any, target?: any, renderMode?: any): any; | ||
unwrap<T>(value: KnockoutObservable<T> | T): T; | ||
unwrap<T>(value: KnockoutObservable<T> | T): T; | ||
computedContext: KnockoutComputedContext; | ||
computedContext: KnockoutComputedContext; | ||
@@ -575,6 +572,6 @@ ////////////////////////////////// | ||
bindingProvider: { | ||
instance: KnockoutBindingProvider; | ||
new (): KnockoutBindingProvider; | ||
} | ||
bindingProvider: { | ||
instance: KnockoutBindingProvider; | ||
new (): KnockoutBindingProvider; | ||
} | ||
@@ -618,11 +615,11 @@ ///////////////////////////////// | ||
interface KnockoutBindingProvider { | ||
nodeHasBindings(node: Node): boolean; | ||
getBindings(node: Node, bindingContext: KnockoutBindingContext): {}; | ||
getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; }; | ||
nodeHasBindings(node: Node): boolean; | ||
getBindings(node: Node, bindingContext: KnockoutBindingContext): {}; | ||
getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; }; | ||
} | ||
interface KnockoutComputedContext { | ||
getDependenciesCount(): number; | ||
isInitial: () => boolean; | ||
isSleeping: boolean; | ||
getDependenciesCount(): number; | ||
isInitial: () => boolean; | ||
isSleeping: boolean; | ||
} | ||
@@ -708,3 +705,3 @@ | ||
declare module "knockout" { | ||
export = ko; | ||
export = ko; | ||
} |
{ | ||
"name": "@types/knockout", | ||
"version": "3.4.41", | ||
"version": "3.4.42", | ||
"description": "TypeScript definitions for Knockout", | ||
@@ -32,4 +32,4 @@ "license": "MIT", | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "1efe4c77f9955aa8b69e05c03640950cf8d69ad0772a66957d96c7b3d8c4b2d9", | ||
"typesPublisherContentHash": "86e9d2d9c0b8641ab1ab4890e483a1143d28455fe7fdbd35dd3ded7883b5bb89", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Fri, 16 Jun 2017 16:37:51 GMT | ||
* Last updated: Fri, 14 Jul 2017 14:13:25 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: ko |
28471
516