From c2e5d91390ab6a6e52c919bc7c3dfd8b3f126d64 Mon Sep 17 00:00:00 2001 From: Max Bo Date: Wed, 16 Jan 2019 11:23:08 +1100 Subject: [PATCH] Update react-google-recaptcha types - Added the `onErrored?: () => void;` prop, with description sourced from https://developers.google.com/recaptcha/docs/display --- types/react-google-recaptcha/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/react-google-recaptcha/index.d.ts b/types/react-google-recaptcha/index.d.ts index 6636e6c5b6..b705aaf8f6 100644 --- a/types/react-google-recaptcha/index.d.ts +++ b/types/react-google-recaptcha/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for React Google Recaptcha 0.10 +// Type definitions for React Google Recaptcha 1.0 // Project: https://github.com/dozoisch/react-google-recaptcha // Definitions by: Koala Human , Tom Sturge // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -66,6 +66,12 @@ export interface ReCAPTCHAProps { * Optional callback, called when a challenge expires and has to be redone by the user. */ onExpired?: () => void; + /** + * Optional callback, called when reCAPTCHA encounters an error (usually network connectivity) + * and cannot continue until connectivity is restored. If you specify a function here, you are + * responsible for informing the user that they should retry. + */ + onErrored?: () => void; /** * Optional set the stoken parameter, which allows the captcha to be used from different domains, * @see reCAPTCHA secure-token