INNER CODE UNIT · TypeScript
isResponseLike
enisdenjo/graphql-sse · src/client.ts:844
function isResponseLike(val: unknown): val is ResponseLike {
return (
isObject(val) &&
typeof val['ok'] === 'boolean' &&
typeof val['status'] === 'number' &&
typeof val['statusText'] === 'string'
);
}
interface Connection {
url: string;
headers: Record<string, string> | undefined;
waitForThrow: () => Promise<void>;
getResults: (options?: {
signal: AbortSignal;
operationId: string;
}) => AsyncIterable<ExecutionResult | ExecutionPatchResult>;
}