Skip to content

Commit

Permalink
fix jsDoc annotation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mkslanc committed Aug 4, 2022
1 parent 77becac commit 3d33e22
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
12 changes: 6 additions & 6 deletions src/bidihandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ var BidiHandler = function(session) {

/**
* Returns offset of character at position defined by column.
* @param {Number} the screen column position
* @param {Number} col the screen column position
*
* @return {int} horizontal pixel offset of given screen column
* @return {Number} horizontal pixel offset of given screen column
**/
this.getPosLeft = function(col) {
col -= this.wrapIndent;
Expand Down Expand Up @@ -258,10 +258,10 @@ var BidiHandler = function(session) {

/**
* Returns 'selections' - array of objects defining set of selection rectangles
* @param {Number} the start column position
* @param {Number} the end column position
* @param {Number} startCol the start column position
* @param {Number} endCol the end column position
*
* @return {Array of Objects} Each object contains 'left' and 'width' values defining selection rectangle.
* @return {Object[]} Each object contains 'left' and 'width' values defining selection rectangle.
**/
this.getSelections = function(startCol, endCol) {
var map = this.bidiMap, levels = map.bidiLevels, level, selections = [], offset = 0,
Expand Down Expand Up @@ -298,7 +298,7 @@ var BidiHandler = function(session) {

/**
* Converts character coordinates on the screen to respective document column number
* @param {int} character horizontal offset
* @param {Number} posX character horizontal offset
*
* @return {Number} screen column number corresponding to given pixel offset
**/
Expand Down
12 changes: 6 additions & 6 deletions src/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var Anchor = require("./anchor").Anchor;
/**
*
* Creates a new `Document`. If `text` is included, the `Document` contains those strings; otherwise, it's empty.
* @param {String | Array} text The starting text
* @param {String | String[]} textOrLines text The starting text
* @constructor
**/

Expand Down Expand Up @@ -190,7 +190,7 @@ var Document = function(textOrLines) {
* Returns all the text within `range` as an array of lines.
* @param {Range} range The range to work with.
*
* @returns {Array}
* @returns {string[]}
**/
this.getLinesForRange = function(range) {
var lines;
Expand Down Expand Up @@ -322,7 +322,7 @@ var Document = function(textOrLines) {
/**
* Inserts the elements in `lines` into the document as full lines (does not merge with existing line), starting at the row index given by `row`. This method also triggers the `"change"` event.
* @param {Number} row The index of the row to insert at
* @param {Array} lines An array of strings
* @param {string[]} lines An array of strings
* @returns {Object} Contains the final row and column, like this:
* ```
* {row: endRow, column: 0}
Expand Down Expand Up @@ -358,7 +358,7 @@ var Document = function(textOrLines) {
/**
* Inserts the elements in `lines` into the document, starting at the position index given by `row`. This method also triggers the `"change"` event.
* @param {Number} row The index of the row to insert at
* @param {Array} lines An array of strings
* @param {string[]} lines An array of strings
* @returns {Object} Contains the final row and column, like this:
* ```
* {row: endRow, column: 0}
Expand Down Expand Up @@ -514,7 +514,7 @@ var Document = function(textOrLines) {

/**
* Applies all changes in `deltas` to the document.
* @param {Array} deltas An array of delta objects (can include "insert" and "remove" actions)
* @param {Delta[]} deltas An array of delta objects (can include "insert" and "remove" actions)
**/
this.applyDeltas = function(deltas) {
for (var i=0; i<deltas.length; i++) {
Expand All @@ -524,7 +524,7 @@ var Document = function(textOrLines) {

/**
* Reverts all changes in `deltas` from the document.
* @param {Array} deltas An array of delta objects (can include "insert" and "remove" actions)
* @param {Delta[]} deltas An array of delta objects (can include "insert" and "remove" actions)
**/
this.revertDeltas = function(deltas) {
for (var i=deltas.length-1; i>=0; i--) {
Expand Down
14 changes: 7 additions & 7 deletions src/edit_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ var SearchHighlight = require("./search_highlight").SearchHighlight;
//}

/**
* Sets up a new `EditSession` and associates it with the given `Document` and `TextMode`.
* Sets up a new `EditSession` and associates it with the given `Document` and `Mode`.
* @param {Document | String} text [If `text` is a `Document`, it associates the `EditSession` with it. Otherwise, a new `Document` is created, with the initial text]{: #textParam}
* @param {TextMode} mode [The initial language mode to use for the document]{: #modeParam}
* @param {Mode} mode [The initial language mode to use for the document]{: #modeParam}
*
* @constructor
**/
Expand Down Expand Up @@ -683,7 +683,7 @@ EditSession.$uid = 0;
*/
/**
* Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event.
* @param {Array} annotations A list of annotations
* @param {Annotation[]} annotations A list of annotations
*
**/
this.setAnnotations = function(annotations) {
Expand All @@ -693,7 +693,7 @@ EditSession.$uid = 0;

/**
* Returns the annotations for the `EditSession`.
* @returns {Array}
* @returns {Annotation[]}
**/
this.getAnnotations = function() {
return this.$annotations || [];
Expand Down Expand Up @@ -1113,7 +1113,7 @@ EditSession.$uid = 0;

/**
* Reverts previous changes to your document.
* @param {Array} deltas An array of previous changes
* @param {Delta[]} deltas An array of previous changes
* @param {Boolean} dontSelect [If `true`, doesn't select the range of where the change occured]{: #dontSelect}
*
* @returns {Range}
Expand Down Expand Up @@ -1142,7 +1142,7 @@ EditSession.$uid = 0;

/**
* Re-implements a previously undone change to your document.
* @param {Array} deltas An array of previous changes
* @param {Delta[]} deltas An array of previous changes
* @param {Boolean} dontSelect {:dontSelect}
*
* @returns {Range}
Expand Down Expand Up @@ -2077,7 +2077,7 @@ EditSession.$uid = 0;
* Converts characters coordinates on the screen to characters coordinates within the document. [This takes into account code folding, word wrap, tab size, and any other visual modifications.]{: #conversionConsiderations}
* @param {Number} screenRow The screen row to check
* @param {Number} screenColumn The screen column to check
* @param {int} screen character x-offset [optional]
* @param {Number} offsetX screen character x-offset [optional]
*
* @returns {Object} The object returned has two properties: `row` and `column`.
*
Expand Down
2 changes: 1 addition & 1 deletion src/keyboard/vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -4503,7 +4503,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
/**
* @param {CodeMirror} cm CodeMirror object.
* @param {Pos} cur The position to start from.
* @param {int} repeat Number of words to move past.
* @param {Number} repeat Number of words to move past.
* @param {boolean} forward True to search forward. False to search
* backward.
* @param {boolean} wordEnd True to move to end of word. False to move to
Expand Down
6 changes: 3 additions & 3 deletions src/lib/bidiutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ exports.hasBidiCharacters = function(text, textCharTypes){
/**
* Returns visual index corresponding to logical index basing on logicalFromvisual
* map provided by Unicode Bidi algorithm.
* @param {int} logical index of character in text buffer
* @param {Object} object containing logicalFromVisual map
* @param {Number} logIdx logical index of character in text buffer
* @param {Object} rowMap object containing logicalFromVisual map
*
* @return {int} visual index (on display) corresponding to logical index
* @return {Number} visual index (on display) corresponding to logical index
**/
exports.getVisualFromLogicalIdx = function(logIdx, rowMap) {
for (var i = 0; i < rowMap.logicalFromVisual.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/mode/folding/sqlserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ oop.inherits(FoldMode, BaseFoldMode);
};

/**
* @returns {range} folding block for sequence that starts with 'CASE' or 'BEGIN' and ends with 'END'
* @returns {Range} folding block for sequence that starts with 'CASE' or 'BEGIN' and ends with 'END'
* @param {string} matchSequence - the sequence of charaters that started the fold widget, which should remain visible when the fold widget is folded
*/
this.getBeginEndBlock = function(session, row, column, matchSequence) {
Expand Down
2 changes: 1 addition & 1 deletion src/multi_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ var EditSession = require("./edit_session").EditSession;

/**
* Returns a concatenation of all the ranges.
* @returns {Array}
* @returns {Range[]}
* @method Selection.getAllRanges
**/
this.getAllRanges = function() {
Expand Down
6 changes: 3 additions & 3 deletions src/scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var MAX_SCROLL_H = 0x8000;

/**
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
* @param {DOMElement} parent A DOM element
* @param {Element} parent A DOM element
*
* @constructor
**/
Expand Down Expand Up @@ -56,7 +56,7 @@ var ScrollBar = function(parent) {

/**
* Creates a new `VScrollBar`. `parent` is the owner of the scroll bar.
* @param {DOMElement} parent A DOM element
* @param {Element} parent A DOM element
* @param {Object} renderer An editor renderer
*
* @constructor
Expand Down Expand Up @@ -161,7 +161,7 @@ oop.inherits(VScrollBar, ScrollBar);

/**
* Creates a new `HScrollBar`. `parent` is the owner of the scroll bar.
* @param {DOMElement} parent A DOM element
* @param {Element} parent A DOM element
* @param {Object} renderer An editor renderer
*
* @constructor
Expand Down
4 changes: 2 additions & 2 deletions src/virtual_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dom.importCssString(editorCss, "ace_editor.css", false);

/**
* Constructs a new `VirtualRenderer` within the `container` specified, applying the given `theme`.
* @param {DOMElement} container The root element of the editor
* @param {Element} container The root element of the editor
* @param {String} theme The starting theme
*
* @constructor
Expand Down Expand Up @@ -1146,7 +1146,7 @@ var VirtualRenderer = function(container, theme) {

/**
* Sets annotations for the gutter.
* @param {Array} annotations An array containing annotations
* @param {Annotation[]} annotations An array containing annotations
*
**/
this.setAnnotations = function(annotations) {
Expand Down

0 comments on commit 3d33e22

Please sign in to comment.