mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
14 lines
369 B
TypeScript
14 lines
369 B
TypeScript
import { getContext } from 'hono/context-storage';
|
|
import type { AppContext } from 'server/context';
|
|
import type { HonoEnv } from 'server/router';
|
|
|
|
/**
|
|
* Get the full context passed to the loader.
|
|
*
|
|
* @returns The full app context.
|
|
*/
|
|
export const getOptionalLoaderContext = (): AppContext => {
|
|
const { context } = getContext<HonoEnv>().var;
|
|
return context;
|
|
};
|