Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): Changed type of options in translate function of i18nProvider #5869

Closed
wants to merge 1 commit into from

Commits on Apr 19, 2024

  1. Changed type of options in translate function of i18nProvider

    Example with `options: any` gives me the following error:
    
    ```
    Type '(key: string, options?: any) => string | TFunctionDetailedResult<string, any>' is not assignable to type 'TranslateFunction'.
      Type 'string | TFunctionDetailedResult<string, any>' is not assignable to type 'string'.
        Type 'TFunctionDetailedResult<string, any>' is not assignable to type 'string'.ts(2322)
    ```
    
    I found solution in a following file that fixes the error:
    
    https://github.com/Fgruntjes/WFK-Finance/blob/7b6c817b913f89db6197c705d34e260aaf7ed726/frontend/src/i18n-provider/useI18nProvider.ts#L5
    bzhn committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    5bb5e87 View commit details
    Browse the repository at this point in the history