UNPKG

1.69 kBSource Map (JSON)View Raw
1{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../source/core/constants.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,UAAU,CAAC,eAAe,KAAK,UAAU,CAAC;AACxF,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,UAAU,CAAC,cAAc,KAAK,UAAU,CAAC;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,UAAU,CAAC,QAAQ,KAAK,UAAU,CAAC;AAE1E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAEzF,MAAM,QAAQ,GAAG,GAA0B,EAAE,CAAC,SAAyB,CAAC;AACxE,QAAQ,EAEJ,CAAC;AAEL,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,qBAAqB;IAC/B,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,KAAK;CACF,CAAC;AAEX,oDAAoD;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import type {Expect, Equal} from '@type-challenges/utils';\nimport {HttpMethod} from '../types/options.js';\n\nexport const supportsAbortController = typeof globalThis.AbortController === 'function';\nexport const supportsStreams = typeof globalThis.ReadableStream === 'function';\nexport const supportsFormData = typeof globalThis.FormData === 'function';\n\nexport const requestMethods = ['get', 'post', 'put', 'patch', 'head', 'delete'] as const;\n\nconst validate = <T extends Array<true>>() => undefined as unknown as T;\nvalidate<[\n\tExpect<Equal<typeof requestMethods[number], HttpMethod>>,\n]>();\n\nexport const responseTypes = {\n\tjson: 'application/json',\n\ttext: 'text/*',\n\tformData: 'multipart/form-data',\n\tarrayBuffer: '*/*',\n\tblob: '*/*',\n} as const;\n\n// The maximum value of a 32bit int (see issue #117)\nexport const maxSafeTimeout = 2_147_483_647;\n\nexport const stop = Symbol('stop');\n"]}
\No newline at end of file