Skip to content

Commit

Permalink
Fix flow
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Mar 1, 2022
1 parent 1e9a964 commit ad0d6b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
5 changes: 1 addition & 4 deletions packages/react-devtools-shell/src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
// This test harness mounts each test app as a separate root to test multi-root applications.

import {createElement} from 'react';
import {
// $FlowFixMe Flow does not yet know about createRoot()
createRoot,
} from 'react-dom/client';
import {createRoot} from 'react-dom/client';
import {render, unmountComponentAtNode} from 'react-dom';
import DeeplyNestedComponents from './DeeplyNestedComponents';
import Iframe from './Iframe';
Expand Down
1 change: 0 additions & 1 deletion packages/react-devtools-shell/src/e2e/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const container = document.createElement('div');
// so that it can load things other than just ToDoList.
const App = require('./apps/ListApp').default;

// $FlowFixMe Flow doesn't know about createRoot() yet.
const root = ReactDOMClient.createRoot(container);
root.render(<App />);

Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {

export function createRoot(
container: Container,
options: CreateRootOptions,
options?: CreateRootOptions,
): RootType {
if (__DEV__) {
Internals.usingClientEntryPoint = true;
Expand All @@ -42,7 +42,7 @@ export function createRoot(
export function hydrateRoot(
container: Container,
children: ReactNodeList,
options: HydrateRootOptions,
options?: HydrateRootOptions,
): RootType {
if (__DEV__) {
Internals.usingClientEntryPoint = true;
Expand Down
4 changes: 4 additions & 0 deletions scripts/shared/inlinedHostConfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ module.exports = [
],
paths: [
'react-dom',
'react-dom/client',
'react-dom/src/server/ReactDOMFizzServerNode.js', // react-dom/server.node
'react-server-dom-webpack',
'react-server-dom-webpack/writer',
'react-server-dom-webpack/writer.node.server',
'react-server-dom-webpack/src/ReactFlightDOMServerNode.js', // react-server-dom-webpack/writer.node.server
'react-client/src/ReactFlightClientStream.js', // We can only type check this in streaming configurations.
'react-devtools-shell',
'react-interactions',
],
isFlowTyped: true,
Expand All @@ -40,12 +42,14 @@ module.exports = [
],
paths: [
'react-dom',
'react-dom/client',
'react-dom/unstable_testing',
'react-dom/src/server/ReactDOMFizzServerBrowser.js', // react-dom/server.browser
'react-server-dom-webpack',
'react-server-dom-webpack/writer.browser.server',
'react-server-dom-webpack/src/ReactFlightDOMServerBrowser.js', // react-server-dom-webpack/writer.browser.server
'react-client/src/ReactFlightClientStream.js', // We can only type check this in streaming configurations.
'react-devtools-shell',
],
isFlowTyped: true,
isServerSupported: true,
Expand Down

0 comments on commit ad0d6b4

Please sign in to comment.