Expose data helpers for dev tools use

This commit is contained in:
Fedor Indutny 2024-08-08 16:10:25 -07:00 committed by GitHub
parent 91a34749c1
commit 0f2cda876c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -10,7 +10,9 @@ import * as Curve from './Curve';
import { start as conversationControllerStart } from './ConversationController';
import * as Groups from './groups';
import OS from './util/os/osMain';
import { isProduction } from './util/version';
import * as RemoteConfig from './RemoteConfig';
import { DataReader, DataWriter } from './sql/Client';
// Components
import { ConfirmationDialog } from './components/ConfirmationDialog';
@ -463,5 +465,12 @@ export const setup = (options: {
Services,
State,
Types,
...(isProduction(window.getVersion())
? {}
: {
DataReader,
DataWriter,
}),
};
};

4
ts/window.d.ts vendored
View file

@ -170,6 +170,10 @@ export type SignalCoreType = {
};
conversationControllerStart: () => void;
challengeHandler?: ChallengeHandler;
// Only for debugging in Dev Tools
DataReader?: unknown;
DataWriter?: unknown;
};
declare global {