@@ -86,9 +86,11 @@ const VLQ_CONTINUATION_MASK = 1 << 5;
8686
8787const kMappings = Symbol ( 'kMappings' ) ;
8888
89+ /**
90+ * @class
91+ */
8992class StringCharIterator {
9093 /**
91- * @constructor
9294 * @param {string } string
9395 */
9496 constructor ( string ) {
@@ -97,28 +99,29 @@ class StringCharIterator {
9799 }
98100
99101 /**
100- * @return {string }
102+ * @returns {string }
101103 */
102104 next ( ) {
103105 return StringPrototypeCharAt ( this . _string , this . _position ++ ) ;
104106 }
105107
106108 /**
107- * @return {string }
109+ * @returns {string }
108110 */
109111 peek ( ) {
110112 return StringPrototypeCharAt ( this . _string , this . _position ) ;
111113 }
112114
113115 /**
114- * @return {boolean }
116+ * @returns {boolean }
115117 */
116118 hasNext ( ) {
117119 return this . _position < this . _string . length ;
118120 }
119121}
120122
121123/**
124+ * @class
122125 * Implements Source Map V3 model.
123126 * See https://github.com/google/closure-compiler/wiki/Source-Maps
124127 * for format description.
@@ -131,7 +134,6 @@ class SourceMap {
131134 #lineLengths = undefined ;
132135
133136 /**
134- * @constructor
135137 * @param {SourceMapV3 } payload
136138 */
137139 constructor ( payload , { lineLengths } = { __proto__ : null } ) {
@@ -150,7 +152,7 @@ class SourceMap {
150152 }
151153
152154 /**
153- * @return {object } raw source map v3 payload.
155+ * @returns {object } raw source map v3 payload.
154156 */
155157 get payload ( ) {
156158 return cloneSourceMapV3 ( this . #payload) ;
@@ -161,7 +163,7 @@ class SourceMap {
161163 }
162164
163165 /**
164- * @return {number[] | undefined } line lengths of generated source code
166+ * @returns {number[] | undefined } line lengths of generated source code
165167 */
166168 get lineLengths ( ) {
167169 if ( this . #lineLengths) {
@@ -192,7 +194,7 @@ class SourceMap {
192194 /**
193195 * @param {number } lineOffset 0-indexed line offset in compiled resource
194196 * @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
196198 */
197199 findEntry ( lineOffset , columnOffset ) {
198200 let first = 0 ;
@@ -229,7 +231,7 @@ class SourceMap {
229231 /**
230232 * @param {number } lineNumber 1-indexed line number in compiled resource call site
231233 * @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
233235 */
234236 findOrigin ( lineNumber , columnNumber ) {
235237 const range = this . findEntry ( lineNumber - 1 , columnNumber - 1 ) ;
@@ -319,15 +321,15 @@ class SourceMap {
319321
320322/**
321323 * @param {string } char
322- * @return {boolean }
324+ * @returns {boolean }
323325 */
324326function isSeparator ( char ) {
325327 return char === ',' || char === ';' ;
326328}
327329
328330/**
329331 * @param {SourceMap.StringCharIterator } stringCharIterator
330- * @return {number }
332+ * @returns {number }
331333 */
332334function decodeVLQ ( stringCharIterator ) {
333335 // Read unsigned value.
@@ -359,7 +361,7 @@ function decodeVLQ(stringCharIterator) {
359361
360362/**
361363 * @param {SourceMapV3 } payload
362- * @return {SourceMapV3 }
364+ * @returns {SourceMapV3 }
363365 */
364366function cloneSourceMapV3 ( payload ) {
365367 validateObject ( payload , 'payload' ) ;
@@ -377,7 +379,7 @@ function cloneSourceMapV3(payload) {
377379 * @param {Array } entry1 source map entry [lineNumber, columnNumber, sourceURL,
378380 * sourceLineNumber, sourceColumnNumber]
379381 * @param {Array } entry2 source map entry.
380- * @return {number }
382+ * @returns {number }
381383 */
382384function compareSourceMapEntry ( entry1 , entry2 ) {
383385 const { 0 : lineNumber1 , 1 : columnNumber1 } = entry1 ;
0 commit comments