89
rated 0 times
[
91]
[
2]
/ answers: 1 / hits: 17979
/ 7 Years ago, mon, july 10, 2017, 12:00:00
I'm trying to create a function that returns a Promise with values that can be resolved to null.
Basically something like this:
static getUserById(ids: String): Promise<?User> {
// do something
}
but it is returning an error
Generic type 'Promise' requires 1 type argument(s)
How to create a function in TypeScript that can return a Promise with nullable resolved values?
More From » typescript