import { expectType } from 'tsd'; import { curl } from '..'; // curl expectType((await curl('http://a.com')).data); // RequestOptions expectType((await curl('http://a.com', {})).data); expectType((await curl('http://a.com', { method: 'HEAD', })).data); expectType((await curl('http://a.com', { method: 'head', })).data); // HttpClientResponse const res = await curl('http://a.com'); expectType(res.res.timing?.queuing); expectType(res.res.timing?.dnslookup); expectType(res.res.timing?.connected); expectType(res.res.timing?.requestSent); expectType(res.res.timing?.waiting); expectType(res.res.timing?.contentDownload);