mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
Stream should work outside of iframe for debugging
This commit is contained in:
@@ -1,21 +1,8 @@
|
||||
import { PymStorage } from "talk-framework/lib/storage";
|
||||
|
||||
export class FakeStorage implements PymStorage {
|
||||
public store: Record<string, string> = {};
|
||||
|
||||
public setItem(key: string, value: string) {
|
||||
this.store[key] = value;
|
||||
return Promise.resolve();
|
||||
}
|
||||
public removeItem(key: string) {
|
||||
delete this.store[key];
|
||||
return Promise.resolve();
|
||||
}
|
||||
public getItem(key: string) {
|
||||
return Promise.resolve(this.store[key] || null);
|
||||
}
|
||||
}
|
||||
import {
|
||||
createInMemoryStorage,
|
||||
createPromisifiedStorage,
|
||||
} from "talk-framework/lib/storage";
|
||||
|
||||
export default function createFakePymStorage() {
|
||||
return new FakeStorage();
|
||||
return createPromisifiedStorage(createInMemoryStorage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user