title: How to declare knockout component in typescript?
body: <p>I am trying to follow example to create a component in knockout. </p>
  
  <p><a href="http://knockoutjs.com/documentation/component-overview.html" rel="nofollow">http://knockoutjs.com/documentation/component-overview.html</a></p>
  
  <p>But I have to write a code in typescript. So how can I register component in knockout using typescript? </p>
  
  <p>What should I write in .ts file to convert it in something-like below. </p>
  
  <pre><code>ko.components.register('like-widget', {
  viewModel: function(params) {
  </code></pre>
  
  <p>I started to write code in constructor but don't know how to complete it. </p>
  
  <pre><code>class TodayViewModel {
  todayWidget: KnockoutComponents;
  config: KnockoutComponentTypes.Config;
  constructor() {
      this.config.template = "sdfs.html";
      this.todayWidget.register("like-widget", this.config);
  }}export = TodayViewModel;
  </code></pre>