advanced-post-message
Version:
Inspired from post robot, this module is designed to provide a simple interface for cross domain communication.
37 lines • 1.33 kB
TypeScript
import { EventManagerOptions } from "../eventManager/eventManager.types";
import { UserConfig } from "./configHandler.types";
/**
* Class responsible for handling the configuration settings.
*/
export declare class Config {
private config;
/**
* Replaces the current configuration with the provided partial configuration.
* @param config - The partial configuration to replace the current configuration with.
*/
replace(config: Partial<EventManagerOptions> & {
channelId?: string;
}): void;
/**
* Sets a specific configuration key to the provided value.
* @param key - The configuration key to set.
* @param value - The value to set for the configuration key.
*/
set<K extends keyof UserConfig>(key: K, value: UserConfig[K]): void;
/**
* Retrieves the value of a specific configuration key.
* @param key - The configuration key to retrieve the value for.
* @returns The value of the configuration key.
*/
get<K extends keyof UserConfig>(key: K): UserConfig[K];
/**
* Retrieves all user configurations.
* @returns {UserConfig} The user configurations.
*/
getAll(): UserConfig;
/**
* Resets the configuration to the default values.
*/
reset(): void;
}
//# sourceMappingURL=configHandler.d.ts.map