Skip to content

Commit c8f0dbb

Browse files
authored
chore: upgrade TSTyche (#2291)
1 parent 3c6b30d commit c8f0dbb

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"mockdate": "3.0.5",
4444
"read-pkg": "9.0.1",
4545
"shx": "0.3.4",
46-
"tstyche": "2.1.1",
46+
"tstyche": "3.0.0",
4747
"typescript": "5.6.3",
4848
"vite": "5.4.10",
4949
"vitest": "2.1.4",

packages/use-i18n/src/__typetests__/namespaceTranslation.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test('i18n - namespaceTranslation', () => {
2525
`Argument of type '"doe.john"' is not assignable to parameter of type '"doe" | "describe"'`,
2626
)
2727

28-
expect(namespaceTranslation('doe')('john')).type.toEqual<string>()
28+
expect(namespaceTranslation('doe')('john')).type.toBe<string>()
2929

3030
expect(namespaceTranslation('doe')('doesnotexists')).type.toRaiseError(
3131
`Expected 2 arguments, but got 1.`,
@@ -39,7 +39,7 @@ test('i18n - namespaceTranslation', () => {
3939
namespaceTranslation('doe')('child', {
4040
name: 'Name',
4141
}),
42-
).type.toEqual<string>()
42+
).type.toBe<string>()
4343
expect(
4444
namespaceTranslation('doe')('doesnotexists', {
4545
name: 'Name',
@@ -60,7 +60,7 @@ test('i18n - namespaceTranslation', () => {
6060
age: '30',
6161
name: 'John',
6262
}),
63-
).type.toEqual<string>()
63+
).type.toBe<string>()
6464

6565
expect(namespaceTranslation('describe')('john', {})).type.toRaiseError()
6666
expect(namespaceTranslation('describe')('john')).type.toRaiseError()

packages/use-i18n/src/__typetests__/t.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ const { t } = useI18n<{
1010
}>()
1111

1212
test('i18n - t', () => {
13-
expect(t('hello')).type.toEqual<string>()
13+
expect(t('hello')).type.toBe<string>()
1414
// Single key
1515
expect(t('keydoesnotexists')).type.toRaiseError()
1616

1717
// Multiple keys
18-
expect(t('doe.john')).type.toEqual<string>()
18+
expect(t('doe.john')).type.toBe<string>()
1919
expect(t('doe.doesnotexists')).type.toRaiseError()
2020

2121
// With a param
2222
expect(
2323
t('doe.child', {
2424
name: 'Name',
2525
}),
26-
).type.toEqual<string>()
26+
).type.toBe<string>()
2727
expect(
2828
t('doe.doesnotexists', {
2929
name: 'Name',
@@ -42,7 +42,7 @@ test('i18n - t', () => {
4242
age: '30',
4343
name: 'John',
4444
}),
45-
).type.toEqual<string>()
45+
).type.toBe<string>()
4646

4747
expect(t('describe.john', {})).type.toRaiseError()
4848
expect(t('describe.john')).type.toRaiseError()
@@ -56,7 +56,7 @@ test('i18n - t', () => {
5656
</p>
5757
),
5858
}),
59-
).type.toEqual<string>()
59+
).type.toBe<string>()
6060

6161
// Required generic
6262
const { t: t2 } = useI18n()

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)