Skip to content

Commit 4536314

Browse files
committed
fix jsDoc annotation errors
1 parent 77becac commit 4536314

File tree

10 files changed

+41
-41
lines changed

10 files changed

+41
-41
lines changed

Diff for: src/autocomplete/popup.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ var $singleLineEditor = function(el) {
2525
return editor;
2626
};
2727

28-
/**
29-
* This object is used in some places where needed to show popups - like prompt; autocomplete etc.
30-
* @class
31-
*/
32-
33-
/**
34-
* Creates and renders single line editor in popup window. If `parentNode` param is isset, then attaching it to this element.
35-
* @param {Element} parentNode
36-
* @constructor
37-
*/
38-
var AcePopup = function(parentNode) {
28+
/**
29+
* This object is used in some places where needed to show popups - like prompt; autocomplete etc.
30+
* @class
31+
*/
32+
33+
/**
34+
* Creates and renders single line editor in popup window. If `parentNode` param is isset, then attaching it to this element.
35+
* @param {Element} parentNode
36+
* @constructor
37+
*/
38+
var AcePopup = function(parentNode) {
3939
var el = dom.createElement("div");
4040
var popup = new $singleLineEditor(el);
4141

Diff for: src/bidihandler.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ var BidiHandler = function(session) {
226226

227227
/**
228228
* Returns offset of character at position defined by column.
229-
* @param {Number} the screen column position
229+
* @param {Number} col the screen column position
230230
*
231-
* @return {int} horizontal pixel offset of given screen column
231+
* @return {Number} horizontal pixel offset of given screen column
232232
**/
233233
this.getPosLeft = function(col) {
234234
col -= this.wrapIndent;
@@ -258,10 +258,10 @@ var BidiHandler = function(session) {
258258

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

299299
/**
300300
* Converts character coordinates on the screen to respective document column number
301-
* @param {int} character horizontal offset
301+
* @param {Number} posX character horizontal offset
302302
*
303303
* @return {Number} screen column number corresponding to given pixel offset
304304
**/

Diff for: src/document.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Anchor = require("./anchor").Anchor;
1616
/**
1717
*
1818
* Creates a new `Document`. If `text` is included, the `Document` contains those strings; otherwise, it's empty.
19-
* @param {String | Array} text The starting text
19+
* @param {String | String[]} textOrLines text The starting text
2020
* @constructor
2121
**/
2222

@@ -190,7 +190,7 @@ var Document = function(textOrLines) {
190190
* Returns all the text within `range` as an array of lines.
191191
* @param {Range} range The range to work with.
192192
*
193-
* @returns {Array}
193+
* @returns {string[]}
194194
**/
195195
this.getLinesForRange = function(range) {
196196
var lines;
@@ -322,7 +322,7 @@ var Document = function(textOrLines) {
322322
/**
323323
* 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.
324324
* @param {Number} row The index of the row to insert at
325-
* @param {Array} lines An array of strings
325+
* @param {string[]} lines An array of strings
326326
* @returns {Object} Contains the final row and column, like this:
327327
* ```
328328
* {row: endRow, column: 0}
@@ -358,7 +358,7 @@ var Document = function(textOrLines) {
358358
/**
359359
* Inserts the elements in `lines` into the document, starting at the position index given by `row`. This method also triggers the `"change"` event.
360360
* @param {Number} row The index of the row to insert at
361-
* @param {Array} lines An array of strings
361+
* @param {string[]} lines An array of strings
362362
* @returns {Object} Contains the final row and column, like this:
363363
* ```
364364
* {row: endRow, column: 0}
@@ -514,7 +514,7 @@ var Document = function(textOrLines) {
514514

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

525525
/**
526526
* Reverts all changes in `deltas` from the document.
527-
* @param {Array} deltas An array of delta objects (can include "insert" and "remove" actions)
527+
* @param {Delta[]} deltas An array of delta objects (can include "insert" and "remove" actions)
528528
**/
529529
this.revertDeltas = function(deltas) {
530530
for (var i=deltas.length-1; i>=0; i--) {

Diff for: src/edit_session.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ var SearchHighlight = require("./search_highlight").SearchHighlight;
102102
//}
103103

104104
/**
105-
* Sets up a new `EditSession` and associates it with the given `Document` and `TextMode`.
105+
* Sets up a new `EditSession` and associates it with the given `Document` and `Mode`.
106106
* @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}
107-
* @param {TextMode} mode [The initial language mode to use for the document]{: #modeParam}
107+
* @param {Mode} mode [The initial language mode to use for the document]{: #modeParam}
108108
*
109109
* @constructor
110110
**/
@@ -683,7 +683,7 @@ EditSession.$uid = 0;
683683
*/
684684
/**
685685
* Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event.
686-
* @param {Array} annotations A list of annotations
686+
* @param {Annotation[]} annotations A list of annotations
687687
*
688688
**/
689689
this.setAnnotations = function(annotations) {
@@ -693,7 +693,7 @@ EditSession.$uid = 0;
693693

694694
/**
695695
* Returns the annotations for the `EditSession`.
696-
* @returns {Array}
696+
* @returns {Annotation[]}
697697
**/
698698
this.getAnnotations = function() {
699699
return this.$annotations || [];
@@ -1113,7 +1113,7 @@ EditSession.$uid = 0;
11131113

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

11431143
/**
11441144
* Re-implements a previously undone change to your document.
1145-
* @param {Array} deltas An array of previous changes
1145+
* @param {Delta[]} deltas An array of previous changes
11461146
* @param {Boolean} dontSelect {:dontSelect}
11471147
*
11481148
* @returns {Range}
@@ -2077,7 +2077,7 @@ EditSession.$uid = 0;
20772077
* 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}
20782078
* @param {Number} screenRow The screen row to check
20792079
* @param {Number} screenColumn The screen column to check
2080-
* @param {int} screen character x-offset [optional]
2080+
* @param {Number} offsetX screen character x-offset [optional]
20812081
*
20822082
* @returns {Object} The object returned has two properties: `row` and `column`.
20832083
*

Diff for: src/keyboard/vim.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4503,7 +4503,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
45034503
/**
45044504
* @param {CodeMirror} cm CodeMirror object.
45054505
* @param {Pos} cur The position to start from.
4506-
* @param {int} repeat Number of words to move past.
4506+
* @param {Number} repeat Number of words to move past.
45074507
* @param {boolean} forward True to search forward. False to search
45084508
* backward.
45094509
* @param {boolean} wordEnd True to move to end of word. False to move to

Diff for: src/lib/bidiutil.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ exports.hasBidiCharacters = function(text, textCharTypes){
364364
/**
365365
* Returns visual index corresponding to logical index basing on logicalFromvisual
366366
* map provided by Unicode Bidi algorithm.
367-
* @param {int} logical index of character in text buffer
368-
* @param {Object} object containing logicalFromVisual map
367+
* @param {Number} logIdx logical index of character in text buffer
368+
* @param {Object} rowMap object containing logicalFromVisual map
369369
*
370-
* @return {int} visual index (on display) corresponding to logical index
370+
* @return {Number} visual index (on display) corresponding to logical index
371371
**/
372372
exports.getVisualFromLogicalIdx = function(logIdx, rowMap) {
373373
for (var i = 0; i < rowMap.logicalFromVisual.length; i++) {

Diff for: src/mode/folding/sqlserver.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ oop.inherits(FoldMode, BaseFoldMode);
4747
};
4848

4949
/**
50-
* @returns {range} folding block for sequence that starts with 'CASE' or 'BEGIN' and ends with 'END'
50+
* @returns {Range} folding block for sequence that starts with 'CASE' or 'BEGIN' and ends with 'END'
5151
* @param {string} matchSequence - the sequence of charaters that started the fold widget, which should remain visible when the fold widget is folded
5252
*/
5353
this.getBeginEndBlock = function(session, row, column, matchSequence) {

Diff for: src/multi_select.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ var EditSession = require("./edit_session").EditSession;
157157

158158
/**
159159
* Returns a concatenation of all the ranges.
160-
* @returns {Array}
160+
* @returns {Range[]}
161161
* @method Selection.getAllRanges
162162
**/
163163
this.getAllRanges = function() {

Diff for: src/scrollbar.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var MAX_SCROLL_H = 0x8000;
1616

1717
/**
1818
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
19-
* @param {DOMElement} parent A DOM element
19+
* @param {Element} parent A DOM element
2020
*
2121
* @constructor
2222
**/
@@ -56,7 +56,7 @@ var ScrollBar = function(parent) {
5656

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

162162
/**
163163
* Creates a new `HScrollBar`. `parent` is the owner of the scroll bar.
164-
* @param {DOMElement} parent A DOM element
164+
* @param {Element} parent A DOM element
165165
* @param {Object} renderer An editor renderer
166166
*
167167
* @constructor

Diff for: src/virtual_renderer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dom.importCssString(editorCss, "ace_editor.css", false);
2727

2828
/**
2929
* Constructs a new `VirtualRenderer` within the `container` specified, applying the given `theme`.
30-
* @param {DOMElement} container The root element of the editor
30+
* @param {Element} container The root element of the editor
3131
* @param {String} theme The starting theme
3232
*
3333
* @constructor
@@ -1146,7 +1146,7 @@ var VirtualRenderer = function(container, theme) {
11461146

11471147
/**
11481148
* Sets annotations for the gutter.
1149-
* @param {Array} annotations An array containing annotations
1149+
* @param {Annotation[]} annotations An array containing annotations
11501150
*
11511151
**/
11521152
this.setAnnotations = function(annotations) {

0 commit comments

Comments
 (0)