@state-less/leap-frontend
Version:
A collection of open source fullstack services powered by React Server
41 lines (40 loc) • 1.31 kB
TypeScript
type MarkdownProps = {
children: string;
src?: string;
disablePadding?: boolean;
optimisticHeight?: string;
small?: boolean;
preview?: boolean;
center?: boolean;
landing?: boolean;
cacheKey?: string;
fetchFn?: (() => Promise<string>) | null;
errorMD?: string;
citeSrc?: string;
suspend?: boolean;
};
export declare const FetchSOAnswerById: (id: any, url: any) => () => Promise<string>;
export declare const FetchTextContent: (url: any) => () => Promise<string>;
export type FetchState = {
loading: number;
result: string | null;
error: Error | null;
promise: Promise<string | null> | null;
};
export declare const wrappedCache: {};
export declare const resultCache: any;
export declare const useFetch: (initialValue: string, fetchFn: null | (() => Promise<string>), cacheKey: string, { suspend }: {
suspend: any;
}) => {
result: any;
loading: number;
promise: any;
error: null;
} | {
promise: any;
loading: number;
result: string | null;
error: Error | null;
};
export declare const Markdown: ({ children, src, disablePadding, optimisticHeight, small, preview, center, landing, errorMD, fetchFn: userFetchFn, cacheKey, citeSrc, suspend, }: MarkdownProps) => import("react/jsx-runtime").JSX.Element;
export {};