Skip to content

Commit 1664b08

Browse files
FermiDiraknhunzaker
authored andcommitted
added flow types to setInnerHTML (facebook#13495)
1 parent 672e859 commit 1664b08

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react-dom/src/client/setInnerHTML.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow
68
*/
79

810
import {Namespaces} from '../shared/DOMNamespaces';
@@ -18,7 +20,10 @@ let reusableSVGContainer;
1820
* @param {string} html
1921
* @internal
2022
*/
21-
const setInnerHTML = createMicrosoftUnsafeLocalFunction(function(node, html) {
23+
const setInnerHTML = createMicrosoftUnsafeLocalFunction(function(
24+
node: Element,
25+
html: string,
26+
): void {
2227
// IE does not have innerHTML for SVG nodes, so instead we inject the
2328
// new markup in a temp node and then move the child nodes across into
2429
// the target node

0 commit comments

Comments
 (0)