File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ export default class Script {
186186 'diagnostics' ,
187187 {
188188 uri : this . uri . toString ( ) ,
189- diagnostics : this . getDiagnostics ( )
189+ diagnostics : this . getDiagnostics ( ) ,
190190 } ,
191191 ) ;
192192 }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class Workspace {
3434 protected resolvingIncludes = new Map < string , IncludePromise > ( ) ;
3535 protected connection : Connection | null ;
3636 protected configuration : AutoIt3Configuration | null = null ;
37- public readonly eventEmitter : EventEmitter < { diagnostics : { uri : string , diagnostics : Diagnostic [ ] } } > = new EventEmitter ( ) ;
37+ public readonly eventEmitter = new EventEmitter < { diagnostics : { uri : string , diagnostics : Diagnostic [ ] } } > ( ) ;
3838
3939 constructor ( connection : Connection | null = null ) {
4040 this . connection = connection ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
6868 */
6969
7070const workspace = new Workspace ( connection ) ;
71- workspace . eventEmitter . on ( 'diagnostics' , function ( { uri, diagnostics} ) {
71+ workspace . eventEmitter . on ( 'diagnostics' , function ( { uri, diagnostics } ) {
7272 // connection.window.showWarningMessage("onDiagnostics");
7373 connection . sendDiagnostics ( {
7474 uri,
Original file line number Diff line number Diff line change @@ -11,14 +11,16 @@ export default class EventEmitter<Events extends EventMap> {
1111 if ( ! this . listeners [ event ] ) {
1212 this . listeners [ event ] = new Set ( ) ;
1313 }
14- this . listeners [ event ] ! . add ( listener ) ;
14+
15+ this . listeners [ event ] . add ( listener ) ;
1516 }
1617
1718 off < K extends keyof Events > ( event : K , listener : Listener < Events [ K ] > ) : void {
1819 this . listeners [ event ] ?. delete ( listener ) ;
1920
2021 // Optional cleanup to avoid empty sets accumulating
2122 if ( this . listeners [ event ] ?. size === 0 ) {
23+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
2224 delete this . listeners [ event ] ;
2325 }
2426 }
@@ -43,6 +45,7 @@ export default class EventEmitter<Events extends EventMap> {
4345
4446 clear < K extends keyof Events > ( event ?: K ) : void {
4547 if ( event ) {
48+ // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
4649 delete this . listeners [ event ] ;
4750 } else {
4851 this . listeners = { } ;
You can’t perform that action at this time.
0 commit comments