Andrea Simone Costa

Results 13 comments of Andrea Simone Costa

@getify My two cents on point one: if an async generator `yield`s a `promise`, it is automagically awaited: ```js async function * PromiseYielder() { var i = 0; while(true) {...

@getify of course generators are the fulcrum of the lazy iteration in JavaScript (although they are often not used in this way), and that is the main reason I cannot...

@getify What about that? ```javascript function run(gen, ...args) { let it = gen(...args); let next; try { next = it.next(); return handleValue(next); } catch (err) { return Promise.reject(err); } function...

You're welcome! ;)

Ahahaha I understand! Sincerely this part of the book has led me to misunderstand more than one times the real behavior of JS...but I'm not a writer, I understand that...

My two cents to enhance your great explaination. You put `[]` around the `T` type parameter to stop the distribution over union from taking place...you don't want it in that...

Sorry but the last three tests fail with this solution. I mean: ```ts Expect, Expect, Expect ``` The `extends` clause is not enough.

@ghaiklor In my solution, that is quite different, I've used the `Alike` util type: ```ts import { Alike } from '@type-challenges/utils'; type Includes = T extends [] ? false :...

@ghaiklor I agree with you, maybe it is now a medium difficult one.

I suggest a little improvement. Despite the name of the challenge, this solution fails if an array type is used: ```ts type test = Last // inferred as never ```...