Skip to content

Commit

Permalink
Update Flow declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
matei-radu committed Feb 24, 2023
1 parent 5bfd40e commit c4a54c5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import { Component } from "react";
import { ComponentType } from "react";

declare interface ReCaptchaProps {
siteKey: string;
Expand All @@ -18,6 +18,6 @@ declare interface ReCaptchaProps {
onError?: () => any;
}

declare class ReCaptcha mixins Component<ReCaptchaProps, void> {}
declare var ReCaptcha: ComponentType<ReCaptchaProps>;

declare export default typeof ReCaptcha;

0 comments on commit c4a54c5

Please sign in to comment.