Skip to content

Commit e560cfa

Browse files
Revert "remove not longer necessary @ts-expect-error of types.test.ts"
This reverts commit 61bd550.
1 parent 411aad8 commit e560cfa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/i18n/src/__tests__/types.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,41 +47,65 @@ describe('I18n Types', () => {
4747
describe('t', () => {
4848
it('should only allow passing valid combinations of arguments', () => {
4949
i18n.t('simple');
50+
// @ts-expect-error
5051
i18n.t('simple', []);
52+
// @ts-expect-error
5153
i18n.t('simple', ['one']);
54+
// @ts-expect-error
5255
i18n.t('simple', n);
5356

5457
i18n.t('simpleSub1', ['one']);
58+
// @ts-expect-error
5559
i18n.t('simpleSub1');
60+
// @ts-expect-error
5661
i18n.t('simpleSub1', []);
62+
// @ts-expect-error
5763
i18n.t('simpleSub1', ['one', 'two']);
64+
// @ts-expect-error
5865
i18n.t('simpleSub1', n);
5966

6067
i18n.t('simpleSub2', ['one', 'two']);
68+
// @ts-expect-error
6169
i18n.t('simpleSub2');
70+
// @ts-expect-error
6271
i18n.t('simpleSub2', ['one']);
72+
// @ts-expect-error
6373
i18n.t('simpleSub2', ['one', 'two', 'three']);
74+
// @ts-expect-error
6475
i18n.t('simpleSub2', n);
6576

6677
i18n.t('plural', n);
78+
// @ts-expect-error
6779
i18n.t('plural');
80+
// @ts-expect-error
6881
i18n.t('plural', []);
82+
// @ts-expect-error
6983
i18n.t('plural', ['one']);
84+
// @ts-expect-error
7085
i18n.t('plural', n, ['sub']);
7186

7287
i18n.t('pluralSub1', n);
7388
i18n.t('pluralSub1', n, undefined);
7489
i18n.t('pluralSub1', n, ['one']);
90+
// @ts-expect-error
7591
i18n.t('pluralSub1');
92+
// @ts-expect-error
7693
i18n.t('pluralSub1', ['one']);
94+
// @ts-expect-error
7795
i18n.t('pluralSub1', n, []);
96+
// @ts-expect-error
7897
i18n.t('pluralSub1', n, ['one', 'two']);
7998

8099
i18n.t('pluralSub2', n, ['one', 'two']);
100+
// @ts-expect-error
81101
i18n.t('pluralSub2');
102+
// @ts-expect-error
82103
i18n.t('pluralSub2', ['one', 'two']);
104+
// @ts-expect-error
83105
i18n.t('pluralSub2', n, ['one']);
106+
// @ts-expect-error
84107
i18n.t('pluralSub2', n, ['one', 'two', 'three']);
108+
// @ts-expect-error
85109
i18n.t('pluralSub2', n);
86110
});
87111
});

0 commit comments

Comments
 (0)