thenavisapp
Version:
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
9 lines (6 loc) • 322 B
text/typescript
import type {Writable, Readable} from 'node:stream';
import type {ClientRequest} from 'node:http';
function isClientRequest(clientRequest: Writable | Readable): clientRequest is ClientRequest {
return (clientRequest as Writable).writable && !(clientRequest as Writable).writableEnded;
}
export default isClientRequest;