Where Do I Put My Knockout.js Extensions When Using Typescript And Requirejs
I am in the process of porting some javascript code to typescript and using requirejs. I have a config.ts: //file config.ts /// ///
Solution 1:
You can extend existing TypeScript interfaces out of the box. To define your own binding handlers, all you need to do is:
- provide a definition file (say
myBindings.d.ts
) add the following code
interfaceKnockoutBindingHandlers { csharpTypes: KnockoutBindingHandler; }
- Reference this definition file in your extensions.ts file
Post a Comment for "Where Do I Put My Knockout.js Extensions When Using Typescript And Requirejs"