Operators

76 features: 4 implemented, 62 partial, 10 planned. Back to all areas.

FeatureStatusWhat worksTest
AdditionpartialConverts built-in operands to primitives after evaluating both expressions. Concatenates strings or adds a pair of Numbers or BigInts. Mixing numeric kinds throws TypeError. User-defined conversion hooks remain in scope.
Addition assignmentpartialBindings and named or computed members use the underlying operator. Member assignments return the stored result. See tests/member-compound.js.
Array initializerpartialNested literals, elisions and trailing commas are executable. Spread requires iterator dispatch.
AssignmentpartialAvailable for supported scalar expressions and statements.
async functionimplementedAsync function expressions and async arrows, which keep their enclosing this and arguments, return a promise as a declaration does.
async function*partialAn async generator is a generator body whose next, return and throw go through the async generator driver: await suspends it as in an async function, and yield hands the driver a value to await before it settles the request. Async generator methods of classes and object literals are taken too. yield* in an async generator hands its operand to the driver, which runs the requests on its iterator until it is done.
awaitpartialawait suspends an async function in any position an expression can take, adopting a promise or a thenable; a rejection throws at the await. At a module's top level it suspends the module body: once the start has run the jobs, a rejected body throws the reason, and a body still waiting throws an Error, "top-level await did not settle".
Bitwise ANDpartialImplements Number coercion modulo 32 bits and the applicable BigInt semantics. Mixed numeric kinds throw TypeError. User-defined conversion hooks remain planned.
Bitwise AND assignmentpartialBindings and named or computed member assignments use the underlying bitwise operation. The property receiver and key expressions are evaluated once.
Bitwise NOTpartialImplements Number coercion modulo 32 bits and the applicable BigInt semantics. Mixed numeric kinds throw TypeError. User-defined conversion hooks remain planned.
Bitwise ORpartialImplements Number coercion modulo 32 bits and the applicable BigInt semantics. Mixed numeric kinds throw TypeError. User-defined conversion hooks remain planned.
Bitwise OR assignmentpartialBindings and named or computed member assignments use the underlying bitwise operation. The property receiver and key expressions are evaluated once.
Bitwise XORpartialImplements Number coercion modulo 32 bits and the applicable BigInt semantics. Mixed numeric kinds throw TypeError. User-defined conversion hooks remain planned.
Bitwise XOR assignmentpartialBindings and named or computed member assignments use the underlying bitwise operation. The property receiver and key expressions are evaluated once.
classplannedOutside the first executable profile.
Comma operatorplannedOutside the first executable profile.
Conditional operatorpartialConditional expressions evaluate the test once and execute the selected branch. Nested choices associate right. Matching branches retain their native representation. A mixed pair returns a tagged i64 word.tests/conditionals.js
DecrementpartialLocal and captured bindings support prefix and postfix forms. Postfix returns the previous numeric value, including BigInt and signed zero. Property references remain planned.
deletepartialNamed and computed members remove own properties. Strict deletion of non-configurable properties throws. Non-reference expressions still evaluate and return true. Optional delete succeeds on a skipped chain; an executed deletion uses ordinary property semantics. Proxy behavior remains open.tests/delete.js
DestructuringplannedOutside the first executable profile.
DivisionpartialNumber and BigInt operands of matching type use ECMAScript numeric semantics. BigInt division by zero throws RangeError.
Division assignmentpartialApplies to bindings and to named or computed member expressions. Number and BigInt operands of matching type use ECMAScript numeric semantics. BigInt division by zero throws RangeError.
EqualitypartialAbstract equality supports primitive coercion, exact mixed BigInt comparisons, object identity, and supported object-to-primitive conversions.
ExponentiationpartialRight-associative Number or BigInt exponentiation. The base of a power cannot be an unparenthesized unary expression. A negative BigInt exponent throws RangeError. Custom coercion callbacks remain planned.
Exponentiation assignmentpartialBinding statements and member assignment expressions support Number and BigInt powers. Member expressions evaluate the reference once and read the previous value before evaluating the exponent.
functionpartialNamed and anonymous expressions create distinct function identities. A named expression can call itself through its private binding.
function*plannedOutside the first executable profile.
Function callpartialCall a named function, select one at runtime, or call a property by name or computed key. Arguments evaluate once in source order. Generic entries receive undefined for missing arguments and drop excess arguments after evaluation.
Greater thanpartialAvailable for supported scalar expressions and statements.
Greater than or equalpartialAvailable for supported scalar expressions and statements.
GroupingpartialParenthesized expressions in the scalar profile.
importplannedDynamic import uses the explicit module loading policy.
import.metaplannedExpose stable metadata from the embedding module loader.
inpartialMembership checks own array indices, named keys and length, and traverses ordinary-object prototypes. Built-in prototype members remain in scope.
IncrementpartialLocal and captured bindings support prefix and postfix forms. Postfix returns the previous numeric value, including BigInt and signed zero. Property references remain planned.
InequalitypartialAbstract equality supports primitive coercion, exact mixed BigInt comparisons, object identity, and supported object-to-primitive conversions.
instanceofpartialEvaluates the right operand’s Symbol.hasInstance method with the original receiver and converts its result to Boolean. The ordinary fallback checks the callable’s current prototype against the left operand’s ancestry. Bound functions delegate the ordinary check to their target. Some exotic prototype chains remain in scope.
Left shiftpartialImplements Number coercion modulo 32 bits and the applicable BigInt semantics. Mixed numeric kinds throw TypeError. User-defined conversion hooks remain planned.
Left shift assignmentpartialBindings and named or computed member assignments use the underlying bitwise operation. The property receiver and key expressions are evaluated once.
Less thanpartialAvailable for supported scalar expressions and statements.
Less than or equalpartialAvailable for supported scalar expressions and statements.
Logical ANDpartialShort-circuits and returns the selected operand across the executable value types, including combinations with different runtime types.
Logical AND assignmentplannedOutside the first executable profile.
Logical NOTpartialUses ECMAScript truth conversion on Number, boolean, BigInt and undefined.
Logical ORpartialShort-circuits and returns the selected operand across the executable value types, including combinations with different runtime types.
Logical OR assignmentplannedOutside the first executable profile.
MultiplicationpartialAvailable for supported scalar expressions and statements.
Multiplication assignmentpartialBindings and named or computed members use the underlying operator. Member assignments return the stored result. See tests/member-compound.js.
newpartialGuest constructors receive a fresh ordinary receiver with the current constructor prototype. An explicit object return replaces it. Arguments evaluate before constructibility is checked. Named, computed, closure and mutable global Array targets share this path, including construction without parentheses. A constructed guest sees the actual constructor in new.target. Subclass construction remains open.tests/construct.js
new.targetpartialOrdinary calls see undefined, constructors see the actual constructor and nested arrows preserve the binding after return. Module-level use is an early error. Reflect.construct can supply a distinct newTarget. Derived constructors preserve the original newTarget through explicit and default super calls.tests/new-target.js
nullimplementedThe null literal yields the primitive null value, with its own tag.tests/conditionals.js
Nullish coalescingpartialScalar and BigInt expressions preserve their left value, including false, signed zero and NaN. Null and undefined evaluate the fallback. Known present operands remove fallback code and its imports from the image. For a tagged operand, a runtime null or undefined selects the fallback.
Nullish coalescing assignmentplannedOutside the first executable profile.
Object initializerpartialData property definitions support named, quoted, numeric, computed and shorthand keys, duplicate data keys, nested objects and trailing commas. A prototype setter in a literal is distinguished from a computed data property. Concise ordinary methods capture lexical bindings and receive the calling object, including methods with computed Symbol names. Object spread copies own enumerable keys as data properties, invoking source getters in property order. Getter and setter declarations preserve their home object for super, merge duplicate getter/setter pairs in source order and define enumerable, configurable accessor properties. See tests/accessor-declarations.js and tests/super-properties.js. Generator methods remain open.tests/object-literals.ts
Operator precedencepartialSupported unary, binary, logical, conditional and yield expressions preserve their ECMAScript precedence and associativity.
Optional chainingimplementedA null or undefined base skips the remaining unparenthesized chain, including computed names and call arguments. Grouping ends the shortcut and preserves a method reference for a following call. Getter and method receivers, optional delete, and rejection of assignment and update targets follow ordinary reference evaluation.tests/optional-chaining.ts
Property accessorspartialDot and computed access follow ordinary prototypes, invoke accessors with the original receiver and respect descriptor flags. Computed keys preserve symbol identity and normalize string and number spellings. Arrays retain their indexed and length behavior.
RemainderpartialNumber and BigInt operands of matching type use ECMAScript numeric semantics. BigInt division by zero throws RangeError.
Remainder assignmentpartialApplies to bindings and to named or computed member expressions. Number and BigInt operands of matching type use ECMAScript numeric semantics. BigInt division by zero throws RangeError.
Right shiftpartialImplements Number coercion modulo 32 bits and the applicable BigInt semantics. Mixed numeric kinds throw TypeError. User-defined conversion hooks remain planned.
Right shift assignmentpartialBindings and named or computed member assignments use the underlying bitwise operation. The property receiver and key expressions are evaluated once.
Spread syntaxpartialObject spread copies enumerable own keys, including Symbols and virtual UTF-16 indices, into fresh data properties. Source getters can suspend, delete a later key, change its enumerability, or throw. Array and argument spreads remain in scope.tests/object-spread.ts
Strict equalitypartialAvailable for supported scalar expressions and statements.
Strict inequalitypartialAvailable for supported scalar expressions and statements.
SubtractionpartialAvailable for supported scalar expressions and statements.
Subtraction assignmentpartialBindings and named or computed members use the underlying operator. Member assignments return the stored result. See tests/member-compound.js.
superpartialDerived constructor calls and lexical method home objects for reads, calls and assignments, including computed names, nested arrows and borrowed methods. Numeric member updates remain open. See tests/derived-classes.js and tests/super-properties.js.
thispartialA property call passes the receiver and a detached strict call receives undefined. Arrows retain lexical this. Reflect.apply passes an explicit receiver. Base constructors allocate from newTarget.prototype; derived receivers remain uninitialized until a successful super call.tests/reflect-apply.ts
typeofpartialEvaluates operands once. Known primitive and collection types use shared type-name strings. Dynamic values select the name from their runtime tag. Bare undeclared names return undefined as a string. Lexical names throw ReferenceError before initialization. The global-type register describes the standard spelling and type of global bindings. A first-class access to an unimplemented global remains a compiler diagnostic. Remaining function object behavior and Proxies await their runtime representations.
Unary negationpartialApplies ToNumeric, preserving BigInt and signed zero. Symbol throws TypeError.
Unary pluspartialConverts primitive operands to Number. BigInt and Symbol throw TypeError when evaluated.
Unsigned right shiftpartialImplements Number coercion modulo 32 bits and the applicable BigInt semantics. Mixed numeric kinds throw TypeError. User-defined conversion hooks remain planned.
Unsigned right shift assignmentpartialBindings and named or computed member assignments use the underlying bitwise operation. The property receiver and key expressions are evaluated once.
voidimplementedEvaluate the operand once, preserving its effects, and produce undefined.tests/conditionals.js
yieldpartialYield expressions park host-driven invocations and retain tagged values across collection. The host can inspect scalar yields with read_result. Numeric next, return and throw injections unwind through pending handlers. Tagged returns from inside finally-protected regions remain open.
yield*plannedOutside the first executable profile.
At tinyscript commit 0c5984ec; each test is a program that runs the feature.