Skip to content

Commit c403187

Browse files
renovate[bot]renovate-botchambo-e
authored
chore(devdeps): update dependency typescript to v4.7.2 (#797)
* chore(devdeps): update dependency typescript to v4.7.2 * fix: correct use-i18n types Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Emmanuel Chambon <[email protected]>
1 parent d47a14a commit c403187

File tree

4 files changed

+48
-48
lines changed

4 files changed

+48
-48
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"rollup": "2.74.1",
4343
"rollup-plugin-dts": "4.2.2",
4444
"rollup-plugin-visualizer": "5.6.0",
45-
"typescript": "4.6.4",
45+
"typescript": "4.7.2",
4646
"wait-for-expect": "3.0.2"
4747
},
4848
"scripts": {

packages/eslint-config-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
},
3434
"devDependencies": {
3535
"eslint": "8.16.0",
36-
"typescript": "4.6.4"
36+
"typescript": "4.7.2"
3737
}
3838
}

packages/use-i18n/src/formatDate.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const formatOptions = {
3131
month: 'short',
3232
year: 'numeric',
3333
},
34-
}
34+
} as const
3535

3636
const complexFormatOptions = {
3737
// Expected output format: 2020-02-13
@@ -40,10 +40,10 @@ const complexFormatOptions = {
4040
numericHour: (date: Date, locale: string): string =>
4141
`${formatISO(date, { representation: 'date' })} ${intlFormat(
4242
date,
43-
formatOptions.hourOnly as Intl.DateTimeFormatOptions,
43+
formatOptions.hourOnly,
4444
{ locale },
4545
)}`,
46-
}
46+
} as const
4747

4848
export const supportedFormats = [
4949
...Object.keys(formatOptions),
@@ -87,7 +87,7 @@ const formatDate = (
8787
: format
8888

8989
if (properDate instanceof Date) {
90-
return intlFormat(properDate, options as Intl.DateTimeFormatOptions, {
90+
return intlFormat(properDate, options as Parameters<typeof intlFormat>[1], {
9191
locale,
9292
})
9393
}

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)