📜  在 JavaScript 代码示例中调用 ts

📅  最后修改于: 2022-03-11 15:03:52.332000             🧑  作者: Mango

代码示例2
function CreateKnockBackViewModel(cust, orders) {
  var cvm = {
             Id: kb.observable(cust,'Id'),
             CompanyName: kb.observable(cust, 'CompanyName'),
             FirstName: kb.observable(cust, 'FirstName'),
             LastName: kb.observable(cust, 'LastName'),
             SalesOrderHeaders: kb.collectionObservable(orders)
           }
  return cvm;
}