@nimpl/getters
Version:
Implementation of server getters in React Server Components without switching to SSR in next.js
17 lines (16 loc) • 654 B
TypeScript
type GetParamsOptions = {
/**
* In case of error or segments difference
* getter will return null
* (_f.e. `/_not-found` could be at `/it/removed-page` and it would not have any params_)
*/
ignoreDifferenceError?: true;
/** Custom pathname (f.e. `["/example/custom"]`). Usable for rewritten pages in SSR or custom functions */
pathname?: string;
/** Custom pagePaths list (f.e. `["/example/[slug]/page"]`). Usable for rewritten pages in SSR or custom functions */
pagePaths?: string[];
};
export declare const getAppParams: (options?: GetParamsOptions) => {
[key: string]: string | string[];
};
export {};