Skip to content

Commit 44cc024

Browse files
bradenmacdonaldarbrandes
authored andcommitted
feat: add a few more types, mark injectIntl as deprecated
1 parent a4e314c commit 44cc024

File tree

3 files changed

+5
-60
lines changed

3 files changed

+5
-60
lines changed
Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -23,66 +23,6 @@
2323
*
2424
*/
2525

26-
/**
27-
* @name createIntl
28-
* @kind function
29-
* @see {@link https://formatjs.io/docs/react-intl/api#createIntl Intl}
30-
*/
31-
32-
/**
33-
* @name FormattedDate
34-
* @kind class
35-
* @see {@link https://formatjs.io/docs/react-intl/components/#formatteddate Intl}
36-
*/
37-
38-
/**
39-
* @name FormattedTime
40-
* @kind class
41-
* @see {@link https://formatjs.io/docs/react-intl/components/#formattedtime Intl}
42-
*/
43-
44-
/**
45-
* @name FormattedRelativeTime
46-
* @kind class
47-
* @see {@link https://formatjs.io/docs/react-intl/components/#formattedrelativetime Intl}
48-
*/
49-
50-
/**
51-
* @name FormattedNumber
52-
* @kind class
53-
* @see {@link https://formatjs.io/docs/react-intl/components/#formattednumber Intl}
54-
*/
55-
56-
/**
57-
* @name FormattedPlural
58-
* @kind class
59-
* @see {@link https://formatjs.io/docs/react-intl/components/#formattedplural Intl}
60-
*/
61-
62-
/**
63-
* @name FormattedMessage
64-
* @kind class
65-
* @see {@link https://formatjs.io/docs/react-intl/components/#formattedmessage Intl}
66-
*/
67-
68-
/**
69-
* @name IntlProvider
70-
* @kind class
71-
* @see {@link https://formatjs.io/docs/react-intl/components/#intlprovider Intl}
72-
*/
73-
74-
/**
75-
* @name defineMessages
76-
* @kind function
77-
* @see {@link https://formatjs.io/docs/react-intl/api#definemessagesdefinemessage Intl}
78-
*/
79-
80-
/**
81-
* @name useIntl
82-
* @kind function
83-
* @see {@link https://formatjs.io/docs/react-intl/api#useIntl Intl}
84-
*/
85-
8626
export {
8727
createIntl,
8828
FormattedDate,
@@ -94,6 +34,9 @@ export {
9434
defineMessages,
9535
IntlProvider,
9636
useIntl,
37+
type IntlConfig,
38+
type ResolvedIntlConfig,
39+
type IntlShape,
9740
} from 'react-intl';
9841

9942
export {

src/i18n/injectIntlWithShim.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getLoggingService, intlShape } from './lib';
77
* property's formatMessage function.
88
*
99
* @memberof I18n
10+
* @deprecated Use 'useIntl' instead
1011
*/
1112
const injectIntlWithShim = (WrappedComponent) => {
1213
class ShimmedIntlComponent extends React.Component {

src/index.js renamed to src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export {
3838
mergeConfig,
3939
ensureConfig,
4040
getExternalLinkUrl,
41+
type ConfigDocument,
4142
} from './config';
4243
export {
4344
initializeMockApp,

0 commit comments

Comments
 (0)