( target: any, klass: any, methodName: string, )
| 1344 | } |
| 1345 | |
| 1346 | function nativeMethod( |
| 1347 | target: any, |
| 1348 | klass: any, |
| 1349 | methodName: string, |
| 1350 | ): (...args: unknown[]) => unknown { |
| 1351 | if (typeof target?.[methodName] === "function") { |
| 1352 | return target[methodName].bind(target); |
| 1353 | } |
| 1354 | const inherited = klass?.prototype?.[methodName]; |
| 1355 | if (typeof inherited === "function") { |
| 1356 | return inherited.bind(target); |
| 1357 | } |
| 1358 | throw new InspectorFailure( |
| 1359 | -32011, |
| 1360 | `${className(target)} does not expose ${methodName}.`, |
| 1361 | ); |
| 1362 | } |
| 1363 | |
| 1364 | function nsWebSocketMessageText(message: any): string | null { |
| 1365 | if (!message) { |
no test coverage detected