File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
packages/svelte2tsx/src/svelte2tsx/nodes Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -204,12 +204,13 @@ class ComponentEventsFromEventsMap {
204204 if ( this . eventDispatcherTyping ) {
205205 return `__sveltets_toEventTypings<${ this . eventDispatcherTyping } >()` ;
206206 }
207+
207208 return (
208209 '{' +
209- this . eventHandler . bubbledEventsMapToString ( ) +
210- [ ...this . dispatchedEvents . keys ( ) ]
211- . map ( ( e ) => `'${ e } ': __sveltets_customEvent` )
212- . join ( ', ' ) +
210+ [
211+ ...this . eventHandler . bubbledEventsAsStrings ( ) ,
212+ ... [ ... this . dispatchedEvents . keys ( ) ] . map ( ( e ) => `'${ e } ': __sveltets_customEvent` )
213+ ] . join ( ', ' ) +
213214 '}'
214215 ) ;
215216 }
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ export class EventHandler {
4646 return eventNames ;
4747 }
4848
49- bubbledEventsMapToString ( ) {
50- return Array . from ( this . bubbledEvents . entries ( ) ) . map ( eventMapEntryToString ) . join ( ', ' ) ;
49+ bubbledEventsAsStrings ( ) {
50+ return Array . from ( this . bubbledEvents . entries ( ) ) . map ( eventMapEntryToString ) ;
5151 }
5252
5353 private handleEventHandlerBubble ( parent : Node , eventName : string ) : void {
You can’t perform that action at this time.
0 commit comments