@serwist/next
Version:
A module that integrates Serwist into your Next.js application.
25 lines • 763 B
TypeScript
import { Serwist } from "@serwist/window";
import { type ReactNode } from "react";
import { useSerwist } from "./lib/context.js";
export interface SerwistProviderProps {
swUrl: string;
disable?: boolean;
register?: boolean;
cacheOnNavigation?: boolean;
reloadOnOnline?: boolean;
options?: RegistrationOptions;
children?: ReactNode;
}
declare global {
interface Window {
serwist: Serwist;
}
}
/**
* `@serwist/window` provider for Next.js apps.
* @param options
* @returns
*/
export declare function SerwistProvider({ swUrl, disable, register, cacheOnNavigation, reloadOnOnline, options, children, }: SerwistProviderProps): import("react").JSX.Element;
export { useSerwist };
//# sourceMappingURL=index.react.d.ts.map