Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 93124c4

Browse files
johnsonwejasonLaster
authored andcommitted
Added @flow header and Object type to getLineNumberWidth() (#5915)
Added // @flow header and Object type to getLineNumberWidth() function Added // @flow header and object type to getLineNumberWidth() function Added Object type to getLineNumberWidth() function Revert "Added Object type to getLineNumberWidth() function" This reverts commit ce4a01a. Revert "Added // @flow header and object type to getLineNumberWidth() function" This reverts commit 6df2fe3. Reverted to original, then added Object type to getLineNumberWidth()
1 parent d6ee1c8 commit 93124c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/ui.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* This Source Code Form is subject to the terms of the Mozilla Public
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
4+
// @flow
45

56
/* Checks to see if the root element is available and
67
* if the element is visible. We check the width of the element
@@ -14,7 +15,7 @@ export function isVisible() {
1415

1516
/* Gets the line numbers width in the code editor
1617
*/
17-
export function getLineNumberWidth(editor) {
18+
export function getLineNumberWidth(editor: Object) {
1819
const gutters = editor.display.gutters;
1920
const lineNumbers = gutters.querySelector(".CodeMirror-linenumbers");
2021
return lineNumbers && lineNumbers.clientWidth;

0 commit comments

Comments
 (0)