Skip to content

Commit 563e11b

Browse files
authored
Ignore type error in i18n util with newer TypeScript versions (#3853)
1 parent 07d1943 commit 563e11b

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/starlight': patch
3+
---
4+
5+
Fixes a type-checking issue for users on newer versions of TypeScript

packages/starlight/utils/i18n.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ function getLocaleDir(locale: Intl.Locale): 'ltr' | 'rtl' {
193193
}
194194
// Firefox does not support `textInfo` or `getTextInfo` yet so we fallback to a well-known list
195195
// of right-to-left languages.
196+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
197+
// @ts-ignore — This is a type error with newer versions of TypeScript’s DOM types.
198+
// TODO: remove or switch to @ts-expect-error in #3572
196199
return wellKnownRTL.includes(locale.language) ? 'rtl' : 'ltr';
197200
}
198201

0 commit comments

Comments
 (0)