UNPKG

rsc-superjson

Version:

A superjson wrapper for React Server Components (RSC) and Next.js

12 lines 756 B
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import RegisterSuperjsonCustomTypesClientside from "./register-custom-types-client"; import SuperJSON from "superjson"; export function RegisterSuperjsonCustomTypesServerside({ registerCustomTypes, }) { registerCustomTypes(SuperJSON); return _jsx(_Fragment, {}); } export function RegisterCustomSuperjsonTypes({ registerCustomTypes, }) { registerCustomTypes(SuperJSON); return _jsxs(_Fragment, { children: [_jsx(RegisterSuperjsonCustomTypesServerside, { registerCustomTypes: registerCustomTypes }), _jsx(RegisterSuperjsonCustomTypesClientside, { registerCustomTypes: registerCustomTypes })] }); } //# sourceMappingURL=register-custom-types-server.js.map