Supported JavaScript runtimes
Recommended TypeScript compiler options
{
"compilerOptions": {
"target": "es2020", // or higher
"lib": ["es2020", "dom", "dom.iterable"]
}
}Last updated
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
Web Streams API and in particular ReadableStream
Async iterables using Symbol.asyncIterator
Runtime environments that are explicitly supported are:
Evergreen browsers which include: Chrome, Safari, Edge, Firefox
Node.js active and maintenance LTS releases
Currently, this is v18 and v20
Bun v1 and above
Deno v1.39
Note that Deno does not currently have native support for streaming file uploads backed by the filesystem (issue link)
The following tsconfig.json options are recommended for projects using this SDK in order to get static type support for features like async iterables, streams and fetch-related APIs (for await...of, AbortSignal, Request, Response and so on):
{
"compilerOptions": {
"target": "es2020", // or higher
"lib": ["es2020", "dom", "dom.iterable"]
}
}While target can be set to older ECMAScript versions, it may result in extra, unnecessary compatibility code being generated if you are not targeting old runtimes.
Last updated