Skip to content

Commit

Permalink
re-enable flow check in github-build-check
Browse files Browse the repository at this point in the history
Summary:
OSS CI has been marked as broken for a week or so due to a flow error but was just detected due to T189426364.

```
$ flow check
Error ----------------------------------------------------------------------------------------- flow-typed/react.js:39:6

Cannot resolve name `React$ElementFactory`. [cannot-resolve-name]

   39|   ): React$ElementFactory<ElementType>;
            ^^^^^^^^^^^^^^^^^^^^

```

OSS<>InternalFB inconsistencies  could be caught via the sandcastle job `github-build-check`. But `flow check` was purposefully disabled in 2021 in `github-build-check` due to a previous issue (D31590484).

This diff re-enables the `flow check` in `github-build-check` .

It also fixes the `flow` issue we were seeing in OSS CI by removing the deprecated [`createFactory`](https://react.dev/reference/react/createFactory) function from the flow-typed react module -- which we aren't currently using.

Reviewed By: gorodscy

Differential Revision: D57499258

fbshipit-source-id: 1a24cd276a71337af3d5ec05c43ab4d58ebd3243
  • Loading branch information
monicatang authored and facebook-github-bot committed May 17, 2024
1 parent 89b3c29 commit d775951
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions flow-typed/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ declare module react {
): React$Context<T>;
declare export var createElement: React$CreateElement;
declare export var cloneElement: React$CloneElement;
declare export function createFactory<ElementType: React$ElementType>(
type: ElementType,
): React$ElementFactory<ElementType>;
declare export function createRef<T>(): {|current: null | T|};

declare export function isValidElement(element: any): boolean;
Expand Down Expand Up @@ -219,7 +216,6 @@ declare module react {
+createContext: typeof createContext,
+createElement: typeof createElement,
+cloneElement: typeof cloneElement,
+createFactory: typeof createFactory,
+createRef: typeof createRef,
+forwardRef: typeof forwardRef,
+isValidElement: typeof isValidElement,
Expand Down

0 comments on commit d775951

Please sign in to comment.