Skip to content

Function: mockPcall()

ts
function mockPcall(callable: (...args: never[]) => unknown, ...args: never[]): [boolean, unknown];

Mock lua pcall global.

Parameters

ParameterTypeDescription
callable(...args: never[]) => unknownFunction to call protected.
...argsnever[]Arguments forwarded to the callable.

Returns

[boolean, unknown]

Whether the call completed, paired with its result or the error message.