Skip to content

Commit

Permalink
chore: add test; bump version and build dts
Browse files Browse the repository at this point in the history
  • Loading branch information
zewa666 committed Mar 6, 2023
1 parent 46a8339 commit 537c8d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/aurelia-i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export declare class I18N {
nf(options?: Intl.NumberFormatOptions, locales?: string | string[]): Intl.NumberFormat;
uf(numberLike: string, locale?: string): number;
df(options?: Intl.DateTimeFormatOptions, locales?: string | string[]): Intl.DateTimeFormat;
tr<TResult extends string | object | Array<string | object> | undefined = string>(key: string | string[], options?: TOptions<object>): TResult;
tr<TResult extends string | object | Array<string | object> | undefined = string>(key: string | string[], options?: TOptions): TResult;
registerGlobalVariable(key: string, value: any): void;
unregisterGlobalVariable(key: string): void;
/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-i18n",
"version": "4.0.3",
"version": "4.0.4",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand Down
5 changes: 5 additions & 0 deletions test/unit/i18n.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ describe("testing i18n translations", () => {
expect(sut.i18next.options.fallbackLng).toEqual(["en"]);
});

it("should have proper overload types for tr", () => {
const value = 1;
sut.tr("key", {score: value});
});

it("should map complex object", () => {
const options = {
threshold: {
Expand Down

0 comments on commit 537c8d1

Please sign in to comment.