(_target, _thisArg, args: unknown[])
| 240 | return nest([...path, key], role); |
| 241 | }, |
| 242 | apply(_target, _thisArg, args: unknown[]) { |
| 243 | const [only] = args; |
| 244 | if ( |
| 245 | path.length === 1 && |
| 246 | role === undefined && |
| 247 | args.length === 1 && |
| 248 | typeof only === "string" |
| 249 | ) { |
| 250 | return nest(path, only); |
| 251 | } |
| 252 | return request({ |
| 253 | path, |
| 254 | args, |
| 255 | ...(role === undefined ? {} : { role }), |
| 256 | }); |
| 257 | }, |
| 258 | }); |
| 259 | |
| 260 | return nest([], undefined) as Record<string, unknown>; |
no test coverage detected