@serwist/turbopack
Version:
A module that integrates Serwist into your Next.js / Turbopack application.
42 lines (41 loc) • 997 B
text/typescript
import { Serwist } from "@serwist/window";
import { ReactNode } from "react";
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
//#region src/lib/context.d.ts
interface SerwistContextValues {
serwist: Serwist | null;
}
declare const useSerwist: () => SerwistContextValues;
//#endregion
//#region src/index.react.d.ts
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
*/
declare function SerwistProvider({
swUrl,
disable,
register,
cacheOnNavigation,
reloadOnOnline,
options,
children
}: SerwistProviderProps): _$react_jsx_runtime0.JSX.Element;
//#endregion
export { SerwistProvider, SerwistProviderProps, useSerwist };
//# sourceMappingURL=index.react.d.mts.map