1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-09 13:44:04 +02:00
This commit is contained in:
syuilo
2025-03-10 11:17:08 +09:00
parent db5c6fa3c2
commit 05078e9c14
2 changed files with 6 additions and 6 deletions

View File

@@ -36,7 +36,8 @@ type PizzaxChannelMessage<T extends StateDef> = {
userId?: string;
};
class Store<T extends StateDef> extends Pizzax<State<T>> {
// TODO: export消す
export class Store<T extends StateDef> extends Pizzax<State<T>> {
public readonly def: T;
public readonly ready: Promise<void>;
@@ -60,7 +61,7 @@ class Store<T extends StateDef> extends Pizzax<State<T>> {
return promise;
}
constructor(def: T) {
constructor(def: T, key = 'base') {
const data = {} as State<T>;
for (const [k, v] of Object.entries(def) as [keyof T, T[keyof T]['default']][]) {
@@ -69,7 +70,6 @@ class Store<T extends StateDef> extends Pizzax<State<T>> {
super(data);
const key = 'base';
this.key = key;
this.deviceStateKeyName = `pizzax::${key}`;
this.deviceAccountStateKeyName = $i ? `pizzax::${key}::${$i.id}` : '';