diff --git a/src/libs/getPlaidOAuthReceivedRedirectURI/index.native.js b/src/libs/getPlaidOAuthReceivedRedirectURI/index.native.js deleted file mode 100644 index 461f67a0a4bc..000000000000 --- a/src/libs/getPlaidOAuthReceivedRedirectURI/index.native.js +++ /dev/null @@ -1 +0,0 @@ -export default () => null; diff --git a/src/libs/getPlaidOAuthReceivedRedirectURI/index.native.ts b/src/libs/getPlaidOAuthReceivedRedirectURI/index.native.ts new file mode 100644 index 000000000000..c435d1799cb8 --- /dev/null +++ b/src/libs/getPlaidOAuthReceivedRedirectURI/index.native.ts @@ -0,0 +1,5 @@ +import GetPlaidOAuthReceivedRedirectURI from './types'; + +const getPlaidOAuthReceivedRedirectURI: GetPlaidOAuthReceivedRedirectURI = () => null; + +export default getPlaidOAuthReceivedRedirectURI; diff --git a/src/libs/getPlaidOAuthReceivedRedirectURI/index.js b/src/libs/getPlaidOAuthReceivedRedirectURI/index.ts similarity index 77% rename from src/libs/getPlaidOAuthReceivedRedirectURI/index.js rename to src/libs/getPlaidOAuthReceivedRedirectURI/index.ts index 849332a12895..8492a2d9c91e 100644 --- a/src/libs/getPlaidOAuthReceivedRedirectURI/index.js +++ b/src/libs/getPlaidOAuthReceivedRedirectURI/index.ts @@ -1,10 +1,11 @@ +import GetPlaidOAuthReceivedRedirectURI from './types'; + /** * After a user authenticates their bank in the Plaid OAuth flow, Plaid returns us to the redirectURI we * gave them along with a stateID param. We hand off the receivedRedirectUri to PlaidLink to finish connecting * the user's account. - * @returns {String | null} */ -export default () => { +const getPlaidOAuthReceivedRedirectURI: GetPlaidOAuthReceivedRedirectURI = () => { const receivedRedirectURI = window.location.href; const receivedRedirectSearchParams = new URL(window.location.href).searchParams; const oauthStateID = receivedRedirectSearchParams.get('oauth_state_id'); @@ -15,3 +16,5 @@ export default () => { } return receivedRedirectURI; }; + +export default getPlaidOAuthReceivedRedirectURI; diff --git a/src/libs/getPlaidOAuthReceivedRedirectURI/types.ts b/src/libs/getPlaidOAuthReceivedRedirectURI/types.ts new file mode 100644 index 000000000000..b89f023e05d3 --- /dev/null +++ b/src/libs/getPlaidOAuthReceivedRedirectURI/types.ts @@ -0,0 +1,3 @@ +type GetPlaidOAuthReceivedRedirectURI = () => null | string; + +export default GetPlaidOAuthReceivedRedirectURI;