AndrewLamWARC

Results 8 comments of AndrewLamWARC

I can't believe this challenge is considered easy. Thanks everybody for the explanations. Thanks @misterhomer1992 for help to pass the last test - perhaps last test was added recently. We...

Hi @agb , I dislike the any type as well but your solution fails in at least 2 cases. ```typescript // @ts-expect-error type error = MyAwaited // Fails to unwrap...

@ivan-kleshnin, your All type fails on the empty array test. ```ts type All = TS extends [infer H, ...infer RS] ? (H extends Falsy ? false : All) : true...

Ignore above. I just read the comment "Distributive union does not give control over the "empty array" case (which should result in true for all / every)."

The All type can be fixable by storing the original type being tested at the type level. Then we can distinguish whether the empty array is the base case of...

This elegant answer now fails on second test case that was added on 21/12/2022. ```ts type DeepReadonly = keyof T extends never ? T : { readonly [k in keyof...

> I think keyof number doesn't extends never Don't think it's that if I understand your comment - counter example below. I wonder if the recursion approach of this solution...

The suggested fix may not work in the general case. For example "0.5 ml of milk" will be pre-processed to "0. 5 ml of milk". Further segmentation may separate the...