From 7dad953619876d5cef1243833cb6e781234bdbd1 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Tue, 29 Aug 2023 12:17:02 +0200 Subject: [PATCH 1/2] [TS migration] Migrate 'getPlaidDesktopMessage' lib to TypeScript --- src/libs/getPlaidDesktopMessage/index.desktop.js | 1 - src/libs/getPlaidDesktopMessage/index.desktop.ts | 5 +++++ src/libs/getPlaidDesktopMessage/index.js | 1 - src/libs/getPlaidDesktopMessage/index.ts | 5 +++++ src/libs/getPlaidDesktopMessage/types.ts | 3 +++ 5 files changed, 13 insertions(+), 2 deletions(-) delete mode 100644 src/libs/getPlaidDesktopMessage/index.desktop.js create mode 100644 src/libs/getPlaidDesktopMessage/index.desktop.ts delete mode 100644 src/libs/getPlaidDesktopMessage/index.js create mode 100644 src/libs/getPlaidDesktopMessage/index.ts create mode 100644 src/libs/getPlaidDesktopMessage/types.ts diff --git a/src/libs/getPlaidDesktopMessage/index.desktop.js b/src/libs/getPlaidDesktopMessage/index.desktop.js deleted file mode 100644 index f801bafe724d..000000000000 --- a/src/libs/getPlaidDesktopMessage/index.desktop.js +++ /dev/null @@ -1 +0,0 @@ -export default () => 'bankAccount.desktopConnection'; diff --git a/src/libs/getPlaidDesktopMessage/index.desktop.ts b/src/libs/getPlaidDesktopMessage/index.desktop.ts new file mode 100644 index 000000000000..93a336af8227 --- /dev/null +++ b/src/libs/getPlaidDesktopMessage/index.desktop.ts @@ -0,0 +1,5 @@ +import GetPlaidDesktopMessage from './types'; + +const getPlaidDesktopMessage: GetPlaidDesktopMessage = () => 'bankAccount.desktopConnection'; + +export default getPlaidDesktopMessage; diff --git a/src/libs/getPlaidDesktopMessage/index.js b/src/libs/getPlaidDesktopMessage/index.js deleted file mode 100644 index 2d1ec238274a..000000000000 --- a/src/libs/getPlaidDesktopMessage/index.js +++ /dev/null @@ -1 +0,0 @@ -export default () => {}; diff --git a/src/libs/getPlaidDesktopMessage/index.ts b/src/libs/getPlaidDesktopMessage/index.ts new file mode 100644 index 000000000000..4e15827b4109 --- /dev/null +++ b/src/libs/getPlaidDesktopMessage/index.ts @@ -0,0 +1,5 @@ +import GetPlaidDesktopMessage from './types'; + +const getPlaidDesktopMessage: GetPlaidDesktopMessage = () => {}; + +export default getPlaidDesktopMessage; diff --git a/src/libs/getPlaidDesktopMessage/types.ts b/src/libs/getPlaidDesktopMessage/types.ts new file mode 100644 index 000000000000..33e98791e105 --- /dev/null +++ b/src/libs/getPlaidDesktopMessage/types.ts @@ -0,0 +1,3 @@ +type GetPlaidDesktopMessage = () => string | void; + +export default GetPlaidDesktopMessage; From f6ec2efc2ff53c33306fca440678a7a0cfbb0fa6 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Tue, 29 Aug 2023 13:36:03 +0200 Subject: [PATCH 2/2] Change void to undefined --- src/libs/getPlaidDesktopMessage/index.ts | 2 +- src/libs/getPlaidDesktopMessage/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/getPlaidDesktopMessage/index.ts b/src/libs/getPlaidDesktopMessage/index.ts index 4e15827b4109..deccb4df0ac2 100644 --- a/src/libs/getPlaidDesktopMessage/index.ts +++ b/src/libs/getPlaidDesktopMessage/index.ts @@ -1,5 +1,5 @@ import GetPlaidDesktopMessage from './types'; -const getPlaidDesktopMessage: GetPlaidDesktopMessage = () => {}; +const getPlaidDesktopMessage: GetPlaidDesktopMessage = () => undefined; export default getPlaidDesktopMessage; diff --git a/src/libs/getPlaidDesktopMessage/types.ts b/src/libs/getPlaidDesktopMessage/types.ts index 33e98791e105..12a13737339c 100644 --- a/src/libs/getPlaidDesktopMessage/types.ts +++ b/src/libs/getPlaidDesktopMessage/types.ts @@ -1,3 +1,3 @@ -type GetPlaidDesktopMessage = () => string | void; +type GetPlaidDesktopMessage = () => string | undefined; export default GetPlaidDesktopMessage;