UNPKG

telefunc

Version:

Remote functions. Instead of API.

20 lines (19 loc) 966 B
export { getContext }; export { provideTelefuncContext }; export { restoreContext }; export { installAsyncMode }; export { isAsyncMode }; export type { Telefunc }; import type { Telefunc } from './getContext/TelefuncNamespace.js'; type GetContext = () => Telefunc.Context; type ProvideTelefuncContext = (context: Telefunc.Context) => void; type RestoreContext = (context: null | Telefunc.Context) => void; declare function getContext<Context extends object = Telefunc.Context>(): Context; declare function provideTelefuncContext<Context extends object = Telefunc.Context>(context: Context): void; declare function restoreContext(context: null | Telefunc.Context): void; declare function installAsyncMode({ getContext_async, provideTelefuncContext_async, restoreContext_async, }: { getContext_async: GetContext; provideTelefuncContext_async: ProvideTelefuncContext; restoreContext_async: RestoreContext; }): void; declare function isAsyncMode(): boolean;