Eugene Obrezkov

Results 135 comments of Eugene Obrezkov

@dvlden true, by using [generic constraints](https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints) we can narrow the expected type to not allow anything but `Promise`. I was thinking from the different angle, when solving the challenge. I...

@pragmasoft-ua seems like they have added more tests to the challenge. Can you elaborate why the `T extends Promise` check? It seems to me that we could just recursively call...

@pragmasoft-ua I meant your `T extends Promise`. There is no sense in adding one more conditional type to what we already have. Why not `T extends Promise ? Awaited :...

You are right, thanks for clarification! Recently, I've figured it out myself by going through updated TypeScript handbook. For others to read, here is a link to [how to disable...

@DaniGuardiola I'd recommend replace `"NO RESULTS"` with type `never` - https://www.typescriptlang.org/docs/handbook/basic-types.html#never.

@igalklebanov what is the test-case that is failing with the solution?

@michaeljsalo it is worth looking into Indexed Access Type as well (https://www.typescriptlang.org/docs/handbook/2/indexed-access-types.html). There are no restriction on what the type you can pass there, so... you can pass a `number`...

@michaeljsalo don't see any reasons why you can't pass `T[string]`, play around with it 馃槈

@DaniGuardiola if it works with a `string` than it's ok too. I chose it to be an indicator to show I don't care about the end.

@muzichen what is the error you are getting? Please, post the updated solution that works.