本文整理匯總了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);
},
示例2: remove
remove: (ch: BluetoothlePlugin.Characteristic) => {
const chs = result.fetch();
remove(
chs,
(snip: BluetoothlePlugin.Characteristic) => snip.uuid === ch.uuid
);
store.set(KEY, chs);
},
示例3: remove
remove: (periph: Params.peripheral) => {
const periphs = result.fetch();
remove(
periphs,
(peripha: Params.peripheral) => peripha.name === periph.name
);
store.set(KEY, periphs);
},
示例4: remove
remove: (adv: BluetoothlePlugin.AdvertisingParamsAndroid) => {
const advs = result.fetch();
remove(
advs,
(advert: BluetoothlePlugin.AdvertisingParamsAndroid) =>
advert.service === adv.service
);
store.set(KEY);
},
示例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);
},
示例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);
},
示例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);
},
示例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);
},
示例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);
},