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


TypeScript basil.js.default類代碼示例

本文整理匯總了TypeScript中basil.js.default的典型用法代碼示例。如果您正苦於以下問題:TypeScript js.default類的具體用法?TypeScript js.default怎麽用?TypeScript js.default使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: remove

 remove: (scan: BluetoothlePlugin.ScanParams) => {
   const scans = result.fetch();
   remove(
     scans,
     (scana: BluetoothlePlugin.ScanParams) => scana.name === scan.name
   );
   store.set(KEY, scans);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:8,代碼來源:ScanStore.ts

示例2: remove

 remove: (ch: BluetoothlePlugin.Characteristic) => {
   const chs = result.fetch();
   remove(
     chs,
     (snip: BluetoothlePlugin.Characteristic) => snip.uuid === ch.uuid
   );
   store.set(KEY, chs);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:8,代碼來源:CharacteristicStore.ts

示例3: remove

 remove: (periph: Params.peripheral) => {
   const periphs = result.fetch();
   remove(
     periphs,
     (peripha: Params.peripheral) => peripha.name === periph.name
   );
   store.set(KEY, periphs);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:8,代碼來源:PeripheralStore.ts

示例4: remove

 remove: (adv: BluetoothlePlugin.AdvertisingParamsAndroid) => {
   const advs = result.fetch();
   remove(
     advs,
     (advert: BluetoothlePlugin.AdvertisingParamsAndroid) =>
       advert.service === adv.service
   );
   store.set(KEY);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:9,代碼來源:AdvertiseStore.ts

示例5:

 update: (adv: BluetoothlePlugin.AdvertisingParamsAndroid) => {
   if (adv.uuid === "") return;
   const advs = result.fetch();
   const found = result.find(adv.uuid);
   if (!found) {
     advs.push(adv);
   } else {
     advs[result.getIndex(adv)] = adv;
   }
   store.set(KEY, advs);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:11,代碼來源:AdvertiseStore.ts

示例6:

 update: (scan: BluetoothlePlugin.ScanParams) => {
   if (scan.name === "") return;
   const scans = result.fetch();
   const found = result.find(scan.name);
   if (!found) {
     scans.push(scan);
   } else {
     const index = result.getIndex(scan);
     scans[index] = scan;
   }
   store.set(KEY, scans);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:12,代碼來源:ScanStore.ts

示例7:

 update: (svc: Params.initService) => {
   if (svc.service === "") return;
   const svcs = result.fetch();
   const found = result.find(svc.service);
   if (!found) {
     svcs.push(svc);
   } else {
     const index = result.getIndex(svc);
     svcs[index] = svc;
   }
   store.set(KEY, svcs);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:12,代碼來源:ServiceParamStore.ts

示例8:

 update: (periph: Params.peripheral) => {
   if (periph.name === "") return;
   const periphs = result.fetch();
   const found = result.find(periph.name);
   if (!found) {
     periphs.push(periph);
   } else {
     const index = result.getIndex(periph);
     periphs[index] = periph;
   }
   store.set(KEY, periphs);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:12,代碼來源:PeripheralStore.ts

示例9:

 update: (ch: BluetoothlePlugin.Characteristic) => {
   if (ch.uuid === "") return;
   const chs = result.fetch();
   const found = result.find(ch.uuid);
   console.log("found", found);
   console.log(chs);
   if (!found) {
     chs.push(ch);
   } else {
     chs[result.getIndex(ch)] = ch;
   }
   store.set(KEY, chs);
 },
開發者ID:joshuaebowling,項目名稱:cordova-hw,代碼行數:13,代碼來源:CharacteristicStore.ts


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