Files
plainleaf/plug-api/lib/settings_page.ts
T
Zef HemelandGitHub 64b6d9e2df Space config (#1011)
Space config + a whole bunch of other tweaks
2024-08-02 16:47:36 +02:00

16 lines
374 B
TypeScript

import { system } from "$sb/syscalls.ts";
/**
* Retrieves a setting from the space configuration.
* @deprecated Use use `editor.getSpaceConfig` syscall instead
* @param key string
* @param defaultValue
* @returns
*/
export async function readSetting(
key: string,
defaultValue?: any,
): Promise<any> {
return await system.getSpaceConfig(key) ?? defaultValue;
}