functional reactive programming typescript