import { ConfigLoader } from 'loadson' import { RPCExporter } from 'rpclibrary' export type ConfigLoaderIfc = { Config : { getConfig: () => ConfT resetConfig: () => ConfT setConfig: (conf:ConfT) => ConfT setConfigKey: (key:string, value:any) => ConfT deleteConfigKey: (key:string) => ConfT getConfigKey: (key:string) => any } } export class RPCConfigLoader extends ConfigLoader implements RPCExporter, "Config">{ name = "Config" as "Config" RPCs = () => [ this.getConfig, this.resetConfig, this.setConfig, this.setConfigKey, this.deleteConfigKey, this.getConfigKey ] }