next-translate 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +1 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -3,13 +3,7 @@ import type { NextConfig } from 'next';
3
3
  export interface TranslationQuery {
4
4
  [name: string]: any;
5
5
  }
6
- export interface NestedStringObject {
7
- [key: string]: string | NestedStringObject | NestedStringArray;
8
- }
9
- type ValueOrArray<T> = T | ValueOrArray<T>[];
10
- type NestedStringArray = ValueOrArray<string | NestedStringObject>;
11
- export type TranslateValue = string | NestedStringObject | NestedStringArray;
12
- export type Translate = <T extends TranslateValue = string>(i18nKey: string | TemplateStringsArray, query?: TranslationQuery | null, options?: {
6
+ export type Translate = <T extends unknown = string>(i18nKey: string | TemplateStringsArray, query?: TranslationQuery | null, options?: {
13
7
  returnObjects?: boolean;
14
8
  fallback?: string | string[];
15
9
  default?: T | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-translate",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Tiny and powerful i18n tools (Next plugin + API) to translate your Next.js pages.",
5
5
  "license": "MIT",
6
6
  "keywords": [