Pcall's type being weird/outdated

Current type of pcall:
image
Hower it supposed to be:

type Pcall = (func:(...any) -> ...any,...any) -> (boolean,...any)

image
bug was found by my friend Tower - Roblox originally.

Thank you for reaching out.

In this case, the type you are seeing is intentional.
A... and R... represent type packs that you can get more information on here: Type checking - Luau

We are aware that pcall type is not ideal for the case where it returns an error, we are focusing on giving better typechecking for the success case at the moment.

2 Likes