@@ -86,9 +86,11 @@ const VLQ_CONTINUATION_MASK = 1 << 5;
86
86
87
87
const kMappings = Symbol ( 'kMappings' ) ;
88
88
89
+ /**
90
+ * @class
91
+ */
89
92
class StringCharIterator {
90
93
/**
91
- * @constructor
92
94
* @param {string } string
93
95
*/
94
96
constructor ( string ) {
@@ -97,28 +99,29 @@ class StringCharIterator {
97
99
}
98
100
99
101
/**
100
- * @return {string }
102
+ * @returns {string }
101
103
*/
102
104
next ( ) {
103
105
return StringPrototypeCharAt ( this . _string , this . _position ++ ) ;
104
106
}
105
107
106
108
/**
107
- * @return {string }
109
+ * @returns {string }
108
110
*/
109
111
peek ( ) {
110
112
return StringPrototypeCharAt ( this . _string , this . _position ) ;
111
113
}
112
114
113
115
/**
114
- * @return {boolean }
116
+ * @returns {boolean }
115
117
*/
116
118
hasNext ( ) {
117
119
return this . _position < this . _string . length ;
118
120
}
119
121
}
120
122
121
123
/**
124
+ * @class
122
125
* Implements Source Map V3 model.
123
126
* See https://github.com/google/closure-compiler/wiki/Source-Maps
124
127
* for format description.
@@ -131,7 +134,6 @@ class SourceMap {
131
134
#lineLengths = undefined ;
132
135
133
136
/**
134
- * @constructor
135
137
* @param {SourceMapV3 } payload
136
138
*/
137
139
constructor ( payload , { lineLengths } = { __proto__ : null } ) {
@@ -150,7 +152,7 @@ class SourceMap {
150
152
}
151
153
152
154
/**
153
- * @return {object } raw source map v3 payload.
155
+ * @returns {object } raw source map v3 payload.
154
156
*/
155
157
get payload ( ) {
156
158
return cloneSourceMapV3 ( this . #payload) ;
@@ -161,7 +163,7 @@ class SourceMap {
161
163
}
162
164
163
165
/**
164
- * @return {number[] | undefined } line lengths of generated source code
166
+ * @returns {number[] | undefined } line lengths of generated source code
165
167
*/
166
168
get lineLengths ( ) {
167
169
if ( this . #lineLengths) {
@@ -192,7 +194,7 @@ class SourceMap {
192
194
/**
193
195
* @param {number } lineOffset 0-indexed line offset in compiled resource
194
196
* @param {number } columnOffset 0-indexed column offset in compiled resource
195
- * @return {object } representing start of range if found, or empty object
197
+ * @returns {object } representing start of range if found, or empty object
196
198
*/
197
199
findEntry ( lineOffset , columnOffset ) {
198
200
let first = 0 ;
@@ -229,7 +231,7 @@ class SourceMap {
229
231
/**
230
232
* @param {number } lineNumber 1-indexed line number in compiled resource call site
231
233
* @param {number } columnNumber 1-indexed column number in compiled resource call site
232
- * @return {object } representing origin call site if found, or empty object
234
+ * @returns {object } representing origin call site if found, or empty object
233
235
*/
234
236
findOrigin ( lineNumber , columnNumber ) {
235
237
const range = this . findEntry ( lineNumber - 1 , columnNumber - 1 ) ;
@@ -319,15 +321,15 @@ class SourceMap {
319
321
320
322
/**
321
323
* @param {string } char
322
- * @return {boolean }
324
+ * @returns {boolean }
323
325
*/
324
326
function isSeparator ( char ) {
325
327
return char === ',' || char === ';' ;
326
328
}
327
329
328
330
/**
329
331
* @param {SourceMap.StringCharIterator } stringCharIterator
330
- * @return {number }
332
+ * @returns {number }
331
333
*/
332
334
function decodeVLQ ( stringCharIterator ) {
333
335
// Read unsigned value.
@@ -359,7 +361,7 @@ function decodeVLQ(stringCharIterator) {
359
361
360
362
/**
361
363
* @param {SourceMapV3 } payload
362
- * @return {SourceMapV3 }
364
+ * @returns {SourceMapV3 }
363
365
*/
364
366
function cloneSourceMapV3 ( payload ) {
365
367
validateObject ( payload , 'payload' ) ;
@@ -377,7 +379,7 @@ function cloneSourceMapV3(payload) {
377
379
* @param {Array } entry1 source map entry [lineNumber, columnNumber, sourceURL,
378
380
* sourceLineNumber, sourceColumnNumber]
379
381
* @param {Array } entry2 source map entry.
380
- * @return {number }
382
+ * @returns {number }
381
383
*/
382
384
function compareSourceMapEntry ( entry1 , entry2 ) {
383
385
const { 0 : lineNumber1 , 1 : columnNumber1 } = entry1 ;
0 commit comments