|
| 1 | +// frontend-platform currently doesn't provide types... do it ourselves for i18n module at least. |
| 2 | +// We can remove this in the future when we migrate to frontend-shell, or when frontend-platform gets types |
| 3 | +// (whichever comes first). |
| 4 | + |
| 5 | +declare module '@edx/frontend-platform/i18n' { |
| 6 | + // eslint-disable-next-line import/no-extraneous-dependencies |
| 7 | + import { injectIntl as _injectIntl } from 'react-intl'; |
| 8 | + /** @deprecated Use useIntl() hook instead. */ |
| 9 | + export const injectIntl: typeof _injectIntl; |
| 10 | + /** @deprecated Use useIntl() hook instead. */ |
| 11 | + export const intlShape: any; |
| 12 | + |
| 13 | + // eslint-disable-next-line import/no-extraneous-dependencies |
| 14 | + export { |
| 15 | + createIntl, |
| 16 | + FormattedDate, |
| 17 | + FormattedTime, |
| 18 | + FormattedRelativeTime, |
| 19 | + FormattedNumber, |
| 20 | + FormattedPlural, |
| 21 | + FormattedMessage, |
| 22 | + defineMessages, |
| 23 | + IntlProvider, |
| 24 | + useIntl, |
| 25 | + } from 'react-intl'; |
| 26 | + |
| 27 | + // Other exports from the i18n module: |
| 28 | + export const configure: any; |
| 29 | + export const getPrimaryLanguageSubtag: (code: string) => string; |
| 30 | + export const getLocale: (locale?: string) => string; |
| 31 | + export const getMessages: any; |
| 32 | + export const isRtl: (locale?: string) => boolean; |
| 33 | + export const handleRtl: any; |
| 34 | + export const mergeMessages: any; |
| 35 | + export const LOCALE_CHANGED: any; |
| 36 | + export const LOCALE_TOPIC: any; |
| 37 | + export const getCountryList: any; |
| 38 | + export const getCountryMessages: any; |
| 39 | + export const getLanguageList: any; |
| 40 | + export const getLanguageMessages: any; |
| 41 | +} |
0 commit comments