本文整理汇总了TypeScript中flash-store.FlashStoreSync.delete方法的典型用法代码示例。如果您正苦于以下问题:TypeScript FlashStoreSync.delete方法的具体用法?TypeScript FlashStoreSync.delete怎么用?TypeScript FlashStoreSync.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类flash-store.FlashStoreSync
的用法示例。
在下文中一共展示了FlashStoreSync.delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: onLogin
protected async onLogin(userId: string): Promise<void> {
log.verbose('PuppetPadchatManager', `login(%s)`, userId)
if (this.userId) {
throw new Error('userId exist')
}
this.userId = userId
await this.stopCheckScan()
/**
* Update Memory Slot
*/
this.memorySlot = await this.refreshMemorySlotData(
this.memorySlot,
userId,
)
await this.options.memory.set(MEMORY_SLOT_NAME, this.memorySlot)
await this.options.memory.save()
/**
* Init persistence cache
*/
await this.initCache(this.options.token, this.userId)
/**
* Refresh the login-ed user payload
*/
if (this.cacheContactRawPayload) {
this.cacheContactRawPayload.delete(this.userId)
await this.contactRawPayload(this.userId)
}
this.emit('login', this.userId)
}
示例2: contactRawPayloadDirty
public contactRawPayloadDirty(
contactId: string,
): void {
log.verbose('PuppetPadchatManager', 'contactRawPayloadDirty(%d)', contactId)
if (!this.cacheContactRawPayload) {
throw new Error('cache not inited' )
}
this.cacheContactRawPayload.delete(contactId)
}
示例3: roomRawPayloadDirty
public roomRawPayloadDirty(
roomId: string,
): void {
log.verbose('PuppetPadchatManager', 'roomRawPayloadDirty(%d)', roomId)
if (!this.cacheRoomRawPayload) {
throw new Error('cache not inited' )
}
this.cacheRoomRawPayload.delete(roomId)
}