Skip to content

params without specifying type #2

@devpato

Description

@devpato
enroll(classId): Observable<any> {
    if (!this.currentUser)
      return Observable.throw('User not signed in');

    if (this.currentUser.classes.includes[classId])
      return Observable.throw('Already enrolled');

    this.currentUser.classes.push(classId);

    return Observable.empty().delay(1000);
  }

I noticed in several parts of you code you don't specify the param type. for example in the code above classId should be string or number

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions