@@ -80,7 +80,7 @@ export default class DecorationManagement {
8080 *
8181 * @return {Array<Decoration> } all the decorations in this `Minimap`
8282 */
83- getDecorations ( ) {
83+ getDecorations ( ) : Array < Decoration > {
8484 return [ ...this . decorationsById . values ( ) ]
8585 }
8686
@@ -96,7 +96,7 @@ export default class DecorationManagement {
9696 * - decoration: the decoration object that was created
9797 * @return {Disposable } a disposable to stop listening to the event
9898 */
99- onDidAddDecoration ( callback ) {
99+ onDidAddDecoration ( callback : ( event : Object ) = > void ) : Disposable {
100100 return this . emitter . on ( "did-add-decoration" , callback )
101101 }
102102
@@ -112,7 +112,7 @@ export default class DecorationManagement {
112112 * - decoration: the decoration object that was created
113113 * @return {Disposable } a disposable to stop listening to the event
114114 */
115- onDidRemoveDecoration ( callback ) {
115+ onDidRemoveDecoration ( callback : ( event : Object ) = > void ) : Disposable {
116116 return this . emitter . on ( "did-remove-decoration" , callback )
117117 }
118118
@@ -131,7 +131,7 @@ export default class DecorationManagement {
131131 * - decoration: the decoration object that was created
132132 * @return {Disposable } a disposable to stop listening to the event
133133 */
134- onDidChangeDecoration ( callback ) {
134+ onDidChangeDecoration ( callback : ( event : Object ) = > void ) : Disposable {
135135 return this . emitter . on ( "did-change-decoration" , callback )
136136 }
137137
@@ -150,7 +150,7 @@ export default class DecorationManagement {
150150 * - decoration: the decoration object that was created
151151 * @return {Disposable } a disposable to stop listening to the event
152152 */
153- onDidChangeDecorationRange ( callback ) {
153+ onDidChangeDecorationRange ( callback : ( event : Object ) = > void ) : Disposable {
154154 return this . emitter . on ( "did-change-decoration-range" , callback )
155155 }
156156
@@ -164,7 +164,7 @@ export default class DecorationManagement {
164164 * triggered
165165 * @return {Disposable } a disposable to stop listening to the event
166166 */
167- onDidUpdateDecoration ( callback ) {
167+ onDidUpdateDecoration ( callback : ( decoration : Decoration ) = > void ) : Disposable {
168168 return this . emitter . on ( "did-update-decoration" , callback )
169169 }
170170
@@ -174,7 +174,7 @@ export default class DecorationManagement {
174174 * @param {number } id the decoration id
175175 * @return {Decoration } the decoration with the given id
176176 */
177- decorationForId ( id ) {
177+ decorationForId ( id : number ) : Decoration {
178178 return this . decorationsById . get ( id )
179179 }
180180
@@ -186,7 +186,7 @@ export default class DecorationManagement {
186186 * @return {Record<string, Decoration> } the decorations that intersect the passed-in
187187 * range
188188 */
189- decorationsForScreenRowRange ( startScreenRow , endScreenRow ) {
189+ decorationsForScreenRowRange ( startScreenRow : number , endScreenRow : number ) : Record < string , Decoration > {
190190 const decorationsByMarkerId = { }
191191 const markers = this . findMarkers ( {
192192 intersectsScreenRowRange : [ startScreenRow , endScreenRow ] ,
@@ -231,7 +231,7 @@ export default class DecorationManagement {
231231 * highlight-outine decorations at a given
232232 * row
233233 */
234- decorationsByTypeThenRows ( ) {
234+ decorationsByTypeThenRows ( ) : { } {
235235 if ( this . decorationsByTypeThenRowsCache != null ) {
236236 return this . decorationsByTypeThenRowsCache
237237 }
@@ -328,7 +328,7 @@ export default class DecorationManagement {
328328 * @emits {did-add-decoration} when the decoration is created successfully
329329 * @emits {did-change} when the decoration is created successfully
330330 */
331- decorateMarker ( marker , decorationParams ) {
331+ decorateMarker ( marker : Marker , decorationParams : { type : string } ) {
332332 if ( this . destroyed || this . minimap . destroyed || marker == null ) {
333333 return
334334 }
@@ -452,7 +452,7 @@ export default class DecorationManagement {
452452 * @param {Decoration } decoration the decoration for which emitting an event
453453 * @access private
454454 */
455- emitDecorationChanges ( type , decoration ) {
455+ emitDecorationChanges ( type : string , decoration : Decoration ) {
456456 if ( this . destroyed || this . minimap . editorDestroyed ( ) ) {
457457 return
458458 }
@@ -476,7 +476,7 @@ export default class DecorationManagement {
476476 * change object
477477 * @access private
478478 */
479- emitRangeChanges ( type , range , screenDelta ) {
479+ emitRangeChanges ( type : string , range : { } , screenDelta ) {
480480 const startScreenRow = range . start . row
481481 const endScreenRow = range . end . row
482482 const lastRenderedScreenRow = this . minimap . getLastVisibleScreenRow ( )
@@ -503,7 +503,7 @@ export default class DecorationManagement {
503503 * @emits {did-change} when the decoration is removed
504504 * @emits {did-remove-decoration} when the decoration is removed
505505 */
506- removeDecoration ( decoration ) {
506+ removeDecoration ( decoration : Decoration ) {
507507 if ( decoration == null ) {
508508 return
509509 }
@@ -555,7 +555,7 @@ export default class DecorationManagement {
555555 * @emits {did-change} when a decoration have been removed
556556 * @emits {did-remove-decoration} when a decoration have been removed
557557 */
558- removeAllDecorationsForMarker ( marker ) {
558+ removeAllDecorationsForMarker ( marker : Marker ) {
559559 if ( marker == null ) {
560560 return
561561 }
@@ -586,7 +586,7 @@ export default class DecorationManagement {
586586 * @param {Marker } marker the marker for which removing decorations
587587 * @access private
588588 */
589- removedAllMarkerDecorations ( marker ) {
589+ removedAllMarkerDecorations ( marker : Marker ) {
590590 if ( marker == null ) {
591591 return
592592 }
@@ -666,7 +666,7 @@ function getOriginatorPackageName() {
666666 * @return {Array<Object> } the array of diff ranges
667667 * @access private
668668 */
669- function computeRangesDiffs ( oldStart , oldEnd , newStart , newEnd ) {
669+ function computeRangesDiffs ( oldStart : number , oldEnd : number , newStart : number , newEnd : number ) : Array < { } > {
670670 const diffs = [ ]
671671
672672 if ( oldStart . isLessThan ( newStart ) ) {
0 commit comments