Skip to content

Commit d9a0f25

Browse files
committed
Merge pull request DefinitelyTyped#4355 from ErikSchierboom/knockout-pre-rendered
Added typings for knockout-pre-rendered library
2 parents a85cb38 + c52274c commit d9a0f25

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/// <reference path="knockout-pre-rendered.d.ts" />
2+
3+
function initBindingHandler() {
4+
ko.bindingHandlers.init = {
5+
init: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => {},
6+
update: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => {}
7+
};
8+
}
9+
10+
function foreachInitBindingHandler() {
11+
ko.bindingHandlers.foreachInit = {
12+
init: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => { },
13+
update: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => { }
14+
};
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Type definitions for knockout-pre-rendered
2+
// Project: https://github.com/ErikSchierboom/knockout-pre-rendered
3+
// Definitions by: Erik Schierboom <https://github.com/ErikSchierboom>
4+
// Definitions: https://github.com/borisyankov/DefinitelyTyped
5+
6+
/// <reference path="../knockout/knockout.d.ts" />
7+
8+
interface KnockoutBindingHandlers {
9+
init: KnockoutBindingHandler;
10+
foreachInit: KnockoutBindingHandler;
11+
}

0 commit comments

Comments
 (0)