angular-best-practices
angular-best-practices copied to clipboard
params without specifying type
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