Skip to content

Commit 2cbeefd

Browse files
committed
Refactor code-style
1 parent f26f272 commit 2cbeefd

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

lib/index.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
/**
99
* Turn a unist point into a language server protocol position.
1010
*
11-
* @param {Point} point The unist point to convert.
12-
* @returns {LspPosition} The LSP position.
11+
* @param {Point} point
12+
* The unist point to convert.
13+
* @returns {LspPosition}
14+
* The LSP position.
1315
*/
1416
export function fromPoint(point) {
1517
return {
@@ -21,8 +23,10 @@ export function fromPoint(point) {
2123
/**
2224
* Convert an LSP position to a unist point.
2325
*
24-
* @param {LspPosition} lspPosition The LSP position to convert.
25-
* @returns {Point} The unist point.
26+
* @param {LspPosition} lspPosition
27+
* The LSP position to convert.
28+
* @returns {Point}
29+
* The unist point.
2630
*/
2731
export function toPoint(lspPosition) {
2832
return {
@@ -34,8 +38,10 @@ export function toPoint(lspPosition) {
3438
/**
3539
* Convert a unist position to an LSP range.
3640
*
37-
* @param {UnistPosition} unistPosition The unist position to convert.
38-
* @returns {Range} The LSP range.
41+
* @param {UnistPosition} unistPosition
42+
* The unist position to convert.
43+
* @returns {Range}
44+
* The LSP range.
3945
*/
4046
export function fromPosition(unistPosition) {
4147
return {
@@ -47,8 +53,10 @@ export function fromPosition(unistPosition) {
4753
/**
4854
* Convert an LSP range to a unist position.
4955
*
50-
* @param {Range} range The LSP range to convert.
51-
* @returns {UnistPosition} The range converted to a unist position.
56+
* @param {Range} range
57+
* The LSP range to convert.
58+
* @returns {UnistPosition}
59+
* The range converted to a unist position.
5260
*/
5361
export function toPosition(range) {
5462
return {

0 commit comments

Comments
 (0)