Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params without specifying type #2

Open
devpato opened this issue Sep 11, 2019 · 0 comments
Open

params without specifying type #2

devpato opened this issue Sep 11, 2019 · 0 comments

Comments

@devpato
Copy link

devpato commented Sep 11, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant