From c4a54c555a564d3b64b6884f46997de4c5d24f9d Mon Sep 17 00:00:00 2001 From: Matei Radu Date: Fri, 24 Feb 2023 17:44:56 +0100 Subject: [PATCH] Update Flow declarations --- CHANGELOG.md | 1 + package-lock.json | 4 ++-- package.json | 2 +- src/index.js.flow | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c58505..8a77361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Change the minimum supported React version to `16.8.0`, which is the first React version to introduce Hooks. - Refactor constants outside the `ReCaptcha` component. - Refactor some `ReCaptcha` methods as static functions outside the component. +- Update Flow declarations to reflect changes made to `ReCaptcha`. - Update Rollup configuration to be more type-safe. - Bump `@rollup/plugin-node-resolve` to version `15.0.1`. - Bump `@rollup/plugin-typescript` to version `11.0.0`. diff --git a/package-lock.json b/package-lock.json index 52992a2..479ca4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@matt-block/react-recaptcha-v2", - "version": "2.0.0-rc.0", + "version": "2.0.0-rc.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@matt-block/react-recaptcha-v2", - "version": "2.0.0-rc.0", + "version": "2.0.0-rc.1", "license": "MIT", "dependencies": { "nanoid": "^3.3.4" diff --git a/package.json b/package.json index 4b388f3..c80ef43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@matt-block/react-recaptcha-v2", - "version": "2.0.0-rc.0", + "version": "2.0.0-rc.1", "description": "Google reCAPTCHA v2 React component that does not pollute the DOM", "main": "lib/index.esm.js", "types": "types/index.d.ts", diff --git a/src/index.js.flow b/src/index.js.flow index 438ef3e..22a3f11 100644 --- a/src/index.js.flow +++ b/src/index.js.flow @@ -7,7 +7,7 @@ * @flow */ -import { Component } from "react"; +import { ComponentType } from "react"; declare interface ReCaptchaProps { siteKey: string; @@ -18,6 +18,6 @@ declare interface ReCaptchaProps { onError?: () => any; } -declare class ReCaptcha mixins Component {} +declare var ReCaptcha: ComponentType; declare export default typeof ReCaptcha;