Closed rmja closed 1 year ago
I'm submitting a bug report
Please tell us about your environment:
Operating System: any
Node Version: 16.14.2
NPM Version: 8.7.0
JSPM OR Webpack AND Version webpack 5
Browser: all
Language: TypeScript 4.2
Current behavior: The current prototype of i18.tr() has this prototype:
i18.tr()
tr<TResult extends string | object | Array<string | object> | undefined = string>(key: string | string[], options?: TOptions<object>): TResult;
It should instead have:
tr<TResult extends string | object | Array<string | object> | undefined = string>(key: string | string[], options?: TOptions): TResult;
where TOptions = TOptions<StringMap> by default so that one can use overloads such as:
TOptions = TOptions<StringMap>
this.i18n.tr(`key`, { some_interpolation_field: "some interpolated value", })
Expected/desired behavior:
What is the expected behavior? That one can call i18n.tr() with an interpolation map.
What is the motivation / use case for changing the behavior?
I'm submitting a bug report
Please tell us about your environment:
Operating System: any
Node Version: 16.14.2
NPM Version: 8.7.0
JSPM OR Webpack AND Version webpack 5
Browser: all
Language: TypeScript 4.2
Current behavior: The current prototype of
i18.tr()
has this prototype:It should instead have:
where
TOptions = TOptions<StringMap>
by default so that one can use overloads such as:Expected/desired behavior:
What is the expected behavior? That one can call i18n.tr() with an interpolation map.
What is the motivation / use case for changing the behavior?