當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Underscore.extend方法代碼示例

本文整理匯總了TypeScript中duniter/app/lib/common-libs/underscore.Underscore.extend方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Underscore.extend方法的具體用法?TypeScript Underscore.extend怎麽用?TypeScript Underscore.extend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在duniter/app/lib/common-libs/underscore.Underscore的用法示例。


在下文中一共展示了Underscore.extend方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: async

export const prepareDuniterServer = async (options:any) => {

  const catKeyring = { pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd', sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP'};
  const tacKeyring = { pub: '2LvDg21dVXvetTD9GdkPLURavLYEqP3whauvPWX4c2qc', sec: '2HuRLWgKgED1bVio1tdpeXrf7zuUszv1yPHDsDj7kcMC4rVSN9RC58ogjtKNfTbH1eFz7rn38U1PywNs3m6Q7UxE'};
  const remuniterKeyring = { pub: 'DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV', sec: '468Q1XtTq7h84NorZdWBZFJrGkB18CbmbHr9tkp9snt5GiERP7ySs3wM8myLccbAAGejgMRC9rqnXuW3iAfZACm7'};

  const s1 = NewTestingServer(Underscore.extend({ pair: catKeyring }, options || {}));
  const sR = NewTestingServer(Underscore.extend({ pair: remuniterKeyring }, options || {}));

  const cat = {
    uid: 'cat',
    pub: catKeyring.pub,
    sec: catKeyring.sec
  }

  const tac = {
    uid: 'tac',
    pub: tacKeyring.pub,
    sec: tacKeyring.sec
  }

  const remuniter = {
    uid: 'remuniter',
    pub: remuniterKeyring.pub,
    sec: remuniterKeyring.sec
  }

  await s1._server.initWithDAL()
  await sR._server.initWithDAL()

  return { s1, sR, cat, tac, remuniter };
}
開發者ID:duniter,項目名稱:remuniter,代碼行數:32,代碼來源:pay-test.ts


注:本文中的duniter/app/lib/common-libs/underscore.Underscore.extend方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。