import type { ComponentType } from 'react'; const globalThis = new Function('return this')(); /** * @kind function * @name registerPage * @description * 페이지 컴포넌트를 등록하는 함수예요. * * @param {ComponentType} Page - 등록할 페이지 컴포넌트 * @returns {ComponentType} 등록된 페이지 컴포넌트를 반환해요. * * @example * ```typescript * import { registerPage } from './path/to/module'; * * const MyPage: React.FC = () =>
My Page
; * * registerPage(MyPage); * ``` */ export function registerPage(Page: ComponentType): ComponentType { if (globalThis.__SPLIT_CHUNK_ENABLED__) { globalThis.Page = Page; } return Page; }