Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Apr 24, 2024
1 parent 3fd46d4 commit 2375929
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/next-intl/src/server/react-server/getRequestConfig.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import type {IntlConfig} from 'use-intl/core';

type RequestConfig = Omit<IntlConfig, 'locale'>;
type RequestConfig = Omit<IntlConfig, 'locale'> & {
/**
* Instead of reading a `locale` from the argument that's passed to the
* function within `getRequestConfig`, you can include a locale as part of the
* returned request configuration.
*
* This is helpful for apps that only support a single language and for apps
* where the locale should be read from user settings instead of the pathname.
**/
locale?: IntlConfig['locale'];
};

export type GetRequestConfigParams = {
locale: string;
Expand Down

0 comments on commit 2375929

Please sign in to comment.