'use strict' ; import { ISignal , Slot } from '@lumino/signaling' ; export class Signal < T , S > implements ISignal < T , S > { private slots : Set < Slot < T , S > > = new Set < Slot < T , S > > ( ) ; public connect ( slot , thisArg ? ) { const bound = thisArg ? slot . bind ( thisArg ) : slot ; this . slots . add ( bound ) ; return true ; } public disconnect ( slot , thisArg ? ) { const bound = thisArg ? slot . bind ( thisArg ) : slot ; this . slots . delete ( bound ) ; return true ; } public fire ( sender , args ) { this . slots . forEach ( ( s ) => s ( sender , args ) ) ; } }