method
RedisClient.evalsha
sha1: string,
numkeys: number,
...keysAndArgs: string | number[]
): Promise<any>;
Execute a Lua script server side using the script's SHA1 digest
@param sha1
The SHA1 digest of the script (from SCRIPT LOAD)
@param numkeys
The number of keys in the keys array
@param keysAndArgs
The keys followed by additional arguments
@returns
Promise that resolves with the script's return value
const sha = await redis.script("LOAD", "return ARGV[1]");
await redis.evalsha(sha, 0, "hello"); // "hello"The reply is converted the same way as for send.