-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix custom method unavailability issue during connect instance loadin…
…g (cherry-pick beta-> master) (#71) * fix custom method unavailability issue during connect instance loading (cherry-pick) * run prettier
- Loading branch information
1 parent
c0c3356
commit 880767c
Showing
3 changed files
with
55 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ConnectElementTagName } from "./shared.d"; | ||
|
||
/* eslint-disable @typescript-eslint/no-empty-function */ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
|
||
export const ConnectElementCustomMethodConfig = { | ||
"account-onboarding": { | ||
setFullTermsOfServiceUrl: ( | ||
termOfServiceUrl: string | undefined | ||
): void => {}, | ||
setRecipientTermsOfServiceUrl: ( | ||
recipientTermsOfServiceUrl: string | undefined | ||
): void => {}, | ||
setPrivacyPolicyUrl: (privacyPolicyUrl: string | undefined): void => {}, | ||
setSkipTermsOfServiceCollection: ( | ||
skipTermsOfServiceCollection: boolean | undefined | ||
): void => {}, | ||
setOnExit: (listener: (() => void) | undefined): void => {} | ||
} | ||
}; | ||
|
||
// ensure that keys of ConnectElementCustomMethodConfig are from ConnectElementTagName | ||
type HasType<T, Q extends T> = Q; | ||
type CustomMethodConfigValidation = HasType< | ||
ConnectElementTagName, | ||
keyof typeof ConnectElementCustomMethodConfig | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters