Add flow types in getNodeForCharacterOffset (#13908)

This commit is contained in:
Abdul Rauf
2018-10-21 13:18:32 -05:00
committed by Nathan Hunzaker
parent 7ebd90c2c3
commit 82710097f6
+3 -1
View File
@@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import {TEXT_NODE} from '../shared/HTMLNodeType';
@@ -43,7 +45,7 @@ function getSiblingNode(node) {
* @param {number} offset
* @return {?object}
*/
function getNodeForCharacterOffset(root, offset) {
function getNodeForCharacterOffset(root: Element, offset: number): ?Object {
let node = getLeafNode(root);
let nodeStart = 0;
let nodeEnd = 0;