このJavaScriptをコーヒースクリプトに変換するにはどうすればよいですか?
$(function() {
  function AppViewModel() {
    this.firstName = ko.observable();
  }
  ko.applyBindings(new AppViewModel());
});
これを試しましたが、ノックアウトjsバインディングが壊れます
jQuery ->
  AppViewModel = ->
    this.firstName = ko.observable("something")
  ko.applyBindings(new AppViewModel())
これがcoffeescriptが生成するものです
(function() {
  jQuery(function() {
    var ViewModel;
    ViewModel = function() {
      return this.firstName = ko.observable();
    };
    return ko.applyBindings(new ViewModel());
  });
}).call(this);