rsc-superjson
Version:
A superjson wrapper for React Server Components (RSC) and Next.js
15 lines • 723 B
TypeScript
import { ComponentType, ReactNode } from "react";
/**
* Wraps a component with SuperJSON serialization.
* Note that next.js [parallel route slots](https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#slots) are not supported and must be excluded via `excludedSuperjsonProps`.
* The implicit `children` slot is excluded by default.
* @param Component
*/
export declare function withSuperjson<T extends Record<string, any> & {
excludedSuperjsonProps?: string[];
children?: ReactNode;
}>(Component: ComponentType<T>): (props: T & {
children?: ReactNode;
excludedSuperjsonProps?: string[];
}) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=with-superjson.d.ts.map