I'm creating a form with some inputs I want to control, for example, I have an email input.

I'm creating an observable to check if users wrote has email format:

```
//html:
<input matInput type="email" ngModel (ngModelChange)="emailChanged$.next($event)" name="email" required placeholder="EMAIL"/>

//ts:
export class MyComponent implements OnInit {

   emailValid$: Observable<boolean>;
   emailChanged$: Subject<string>;
   subscription: Subscription;

   constructor() {

      this.emailChanged$ = new Subject<string>();

      this.subscription = this.emailChanged$
       .debounceTime(500)
       .map(this.isValidEmail)
       .subscribe(isValid => this.emailValid$ = isValid)

   }

   isValidEmail(email: string): Observable<boolean>{
       return Observable.of(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email));
   }

```

But it's not correct, I have this error when executing (and debounceTime expires)

```
TypeError: Observable_1.Observable.of is not a function
  at MapSubscriber.MyComponent.isValidEmail [as project] (my-component.component.ts:73)
  at MapSubscriber._next (map.js:79)

```

How can I solve it?