Proxy error function does not cause unreachable/terminate thread
I have an error/warning function that will print out standardized error codes to make debugging easier:
When I call this, the type solver appears to ignore that this function terminates the running thread:
This function has no condition for calling
error(), so calling it should be effectively the same as calling error(), which does work:
23 Replies
can you make return type
:never`
?
of the error functionThey already are, and it does not fix it

1 can you try to restart the compiler?
Ctrl + Shift + P -> Restart Ts Server
Didn't work 😕
grrr
can you just for test do a manual error or throw there to just test whether [ok, data] type works properly


what is your typescript version?
5.5.3
can you upgrade it to 5.9.3?
or you use any other transformer besides flamework
they apparerntly introduced better type resolution in the newest versions
5.9.3 still has the error and I don't have any other transformer iirc
error?
the compiler has no issue with it just vscode
same, 'out' is of type 'unknown'
oh yeah...
i'm testing it rn
:biggerthink:
make it a proper function -w-
Solution
it works

grr incredible
Thank you
yaaay, ywyw
it probably thinks that FATAL is some sort of object and cannot be fully trusted
cause it's ARROW function
ARROW function is pretty :(
it's gay! >_<
jk
lol