cli/tsc crashes with Uncaught TypeError
Using latest Deno (1.32.4), this only happens on certain files, but it effectively means that I cannot do type checking with Deno now. The error (somewhat opaque since this looks like generated code):
2 Replies
appears to be happening on the first line of this function:
it's probably some syntax error in my code at the moment that's causing the crash. If I
git stash
the error goes away
ok I figured it out. Seems like it is a bug in the cli/tsc code. If I use Parameters<typeof someValue["someProperty"]>[1]
in a function's parameters, it crashes. However, if I assign that type to a type alias (e.g. type Param1 = Parameters<typeof someValue["someProperty"]>[1]
) then use that alias in the function's parameters, no crash. Not too bad, makes my code more readable anyway.Can you share the project this is happening in? cc @dsherret
Oh I see you figured it out already. May be worth opening an issue in the TypeScript repo