more precies type signature in EventSource