Recently, I've delved into learning angular4 and typescript. If this seems like a simple question, bear with me.
Within my angular service, I've defined a method:
removePerson(person: Person): Promise<void> {
return Promise.resolve(PERSONS.splice(PERSONS.indexOf(person), 1));
}
The Compiler is urging me to adjust the return type of the function to Promise<Person[]>
from Promise<void>
However, I prefer to return void from the Promise. How should I alter the function's body?