@@ -107,21 +107,21 @@ export class TextareaRegistry {
107107 this . sendEvent = sendEvent
108108 }
109109
110- register < T extends CommentSpot > ( textareaInfo : EnhancedTextarea < T > ) : void {
111- this . textareas . set ( textareaInfo . textarea , textareaInfo )
110+ register < T extends CommentSpot > ( enhanced : EnhancedTextarea < T > ) : void {
111+ this . textareas . set ( enhanced . textarea , enhanced )
112112 this . sendEvent ( {
113- draft : textareaInfo . textarea . value ,
114- spot : textareaInfo . spot ,
113+ draft : enhanced . textarea . value ,
114+ spot : enhanced . spot ,
115115 type : 'ENHANCED' ,
116116 } )
117117 }
118118
119119 unregisterDueToModification ( textarea : HTMLTextAreaElement ) : void {
120- const textareaInfo = this . textareas . get ( textarea )
121- if ( textareaInfo ) {
120+ const enhanced = this . textareas . get ( textarea )
121+ if ( enhanced ) {
122122 this . sendEvent ( {
123- draft : textareaInfo . textarea . value ,
124- spot : textareaInfo . spot ,
123+ draft : enhanced . textarea . value ,
124+ spot : enhanced . spot ,
125125 type : 'DESTROYED' ,
126126 } )
127127 this . textareas . delete ( textarea )
@@ -131,8 +131,4 @@ export class TextareaRegistry {
131131 get ( textarea : HTMLTextAreaElement ) : EnhancedTextarea | undefined {
132132 return this . textareas . get ( textarea )
133133 }
134-
135- getAllEnhanced ( ) : EnhancedTextarea [ ] {
136- return Array . from ( this . textareas . values ( ) )
137- }
138134}
0 commit comments