@360works/fmpromise
Version:
A modern JS toolkit for FileMaker Web Viewers, including a dev server and type generation.
15 lines (14 loc) • 631 B
TypeScript
import { ConfigSchema } from './types';
export type { ConfigSchema, ConfigAttribute, SettingsFromSchema } from './types';
declare global {
interface Window {
FMPROMISE_CONFIG?: Record<string, any>;
}
}
/**
* The primary configuration gatekeeper for an fmPromise module.
* It validates pre-injected configuration and provides a UI for developers in dev mode.
* @param schema The configuration schema for the module.
* @returns A promise that resolves with the valid, typed settings object, or never resolves if configuration is needed.
*/
export declare function useConfig<T>(schema: ConfigSchema): Promise<T>;