Add config documentation, and better types

This commit is contained in:
Robin Townsend 2022-11-09 10:53:33 -05:00
commit 0e478f4c20
2 changed files with 27 additions and 10 deletions

View file

@ -1,18 +1,37 @@
export interface IConfigOptions {
export interface ConfigOptions {
/**
* The Posthog endpoint to which analytics data will be sent.
*/
posthog?: {
api_key: string;
api_host: string;
};
/**
* The Sentry endpoint to which crash data will be sent.
*/
sentry?: {
DSN: string;
environment: string;
};
/**
* The rageshake server to which feedback and debug logs will be sent.
*/
rageshake?: {
submit_url: string;
};
}
export const DEFAULT_CONFIG: IConfigOptions = {
export interface ResolvedConfigOptions extends ConfigOptions {
sentry: {
DSN: string;
environment: string;
};
rageshake: {
submit_url: string;
};
}
export const DEFAULT_CONFIG: ResolvedConfigOptions = {
sentry: { DSN: "", environment: "production" },
rageshake: {
submit_url: "https://element.io/bugreports/submit",