gpt4 book ai didi

How to add Dexie addons to TypeScript db file?(如何将Dexie插件添加到打字数据库文件?)

转载 作者:bug小助手 更新时间:2023-10-25 16:58:34 35 4
gpt4 key购买 nike



Hi does anyone know how to add addons to a TS Dexie db?
This is what they show in the docs but they don't show how to do it in TS.

嗨,有人知道如何在TS Dexie数据库中添加插件吗?这是他们在文档中展示的,但他们没有展示如何在TS中做到这一点。




const db = new Dexie('MySyncedDB', {addons: [dexieCloud]});




更多回答
优秀答案推荐

In your constructor that derives from Dexie, pass the addons in your call to super()

在派生自Dexie的构造函数中,将调用中的插件传递给Super()


class MyDexie extends Dexie {
...
constructor() {
super('myDbName', { addons: [dexieCloud] });
...
}
}

更多回答

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com