import { Settings } from '@wordpress/core-data'; type UseOptionReturn = { value: T | undefined; isEdited: boolean; isSaving: boolean; onChange: (newValue: T) => void; onSave: () => Promise; }; type InferOptionType = K extends keyof Settings ? UseOptionReturn : never; /** * Custom hook for managing an option value in the WordPress block editor. * * @template T - The type of the option value. If the option is a built-in WordPress option, this * type will be inferred from the option key. If the option is a custom option, this * type must be provided. */ declare function useOption(key: K): InferOptionType; declare function useOption(key: string): UseOptionReturn; export default useOption; //# sourceMappingURL=index.d.ts.map