import { from } from 'rxjs';
from(firebase.auth().createUserWithEmailAndPassword(email, password))
.subscribe((user: any) => {
console.log('test');
});
Here is a shorter version using a combination of some of the answers above to convert your code from a promise to an observable.