(
f: (...params: Params) => ReadonlyArray<unknown>,
options: {
readonly lua: string
readonly numberOfKeys: number | ((...params: Params) => number)
}
)
| 177 | * @since 4.0.0 |
| 178 | */ |
| 179 | export const script = <Params extends ReadonlyArray<any>>( |
| 180 | f: (...params: Params) => ReadonlyArray<unknown>, |
| 181 | options: { |
| 182 | readonly lua: string |
| 183 | readonly numberOfKeys: number | ((...params: Params) => number) |
| 184 | } |
| 185 | ): Script<{ |
| 186 | params: Params |
| 187 | result: void |
| 188 | }> => |
| 189 | Object.setPrototypeOf({ |
| 190 | ...options, |
| 191 | params: f, |
| 192 | numberOfKeys: typeof options.numberOfKeys === "number" ? constant(options.numberOfKeys) : options.numberOfKeys |
| 193 | }, ScriptProto) |
nothing calls this directly
no test coverage detected