Supported Features
This page lists the TypeScript and JavaScript features that Pure supports. See Not supported for explicit exclusions.
TypeScript syntax
Section titled “TypeScript syntax”| Feature | Status |
|---|---|
| Type annotations, interfaces, type aliases | ✅ |
| Generics | ✅ |
const enum | ✅ |
Regular enum | ✅ |
| Namespaces | ✅ |
Decorators (experimental, experimentalDecorators) | ✅ |
satisfies operator | ✅ |
as const | ✅ |
Non-null assertion (!) | ✅ |
Optional chaining (?.) | ✅ |
Nullish coalescing (??) and assignment (??=) | ✅ |
| Module augmentation / declaration merging | ✅ |
import type | ✅ |
export type | ✅ |
using / await using (ES2025) | ✅ |
JavaScript / ECMAScript features
Section titled “JavaScript / ECMAScript features”| Feature | Status |
|---|---|
async/await | ✅ |
Promise, Promise.all, Promise.allSettled, Promise.any, Promise.race | ✅ |
Generators (function*, yield) | ✅ |
Async generators (async function*, for await) | ✅ |
Classes with private fields (#field) | ✅ |
| Static class fields and methods | ✅ |
class inheritance | ✅ |
Top-level await | ✅ |
ESM import / export | ✅ |
CommonJS require() / module.exports | ✅ (static paths only) |
| Arrow functions, rest/spread | ✅ |
| Destructuring (object and array) | ✅ |
| Template literals and tagged templates | ✅ |
Symbol, Symbol.iterator, Symbol.asyncIterator | ✅ |
WeakRef, FinalizationRegistry | ✅ |
structuredClone | ✅ |
BigInt | ✅ |
Proxy and Reflect | ✅ |
Map, Set, WeakMap, WeakSet | ✅ |
ArrayBuffer, TypedArray (Uint8Array, etc.) | ✅ |
DataView | ✅ |
Intl (collation, formatting) | ✅ (partial — see below) |
| Regular expressions including named capture groups | ✅ |
Error subclassing | ✅ |
AbortController, AbortSignal | ✅ |
EventTarget / EventEmitter | ✅ |
ReadableStream, WritableStream, TransformStream | ✅ (Web Streams API) |
fetch | ✅ |
WebSocket (client) | ✅ |
URL, URLSearchParams | ✅ |
TextEncoder, TextDecoder | ✅ |
crypto.randomUUID(), crypto.subtle | ✅ |
setTimeout, setInterval, clearTimeout, clearInterval | ✅ |
queueMicrotask | ✅ |
console.log/warn/error/debug/trace | ✅ |
Intl coverage
Section titled “Intl coverage”Intl.NumberFormat, Intl.DateTimeFormat, Intl.RelativeTimeFormat, Intl.Collator, and Intl.PluralRules are supported. Intl.DisplayNames and Intl.ListFormat are partially supported — locale data may differ from V8/Node for non-English locales. File an issue if you encounter discrepancies.
Node built-ins
Section titled “Node built-ins”See Node compatibility for a per-module breakdown.
VFS (virtual filesystem)
Section titled “VFS (virtual filesystem)”Files in a directory passed via --vfs-dir are embedded in the binary at compile time. At runtime they appear under the same relative path and are accessible via fs.readFileSync, fs.existsSync, etc. Write operations to VFS paths are not supported.