Skip to content

v1.0.6

Choose a tag to compare

@nickna nickna released this 23 Jan 19:33
· 261 commits to main since this release

Release Notes - v1.0.6

Highlights

This release introduces a comprehensive timer system (setTimeout, setInterval), ES2022 private class elements, CommonJS module support, resource management (using/await using), type predicates, and many type system enhancements.


Timer System

Full implementation of JavaScript timer APIs with proper main-thread execution:

  • setTimeout / clearTimeout - Delayed callback execution
  • setInterval / clearInterval - Repeating callback execution
  • globalThis - ES2020 global object support with property access and method calls
  • Virtual timer system - Main thread execution to avoid scheduling issues across platforms
  • Automatic cleanup - Timer registration for proper disposal on interpreter shutdown
  • Thread synchronization - Callback execution synchronized with interpreter's main thread

ES2022 Private Class Elements

Full support for private class members in both interpreter and IL compiler:

  • Private fields - #field syntax with proper encapsulation
  • Private methods - #method() with access checks
  • IL compiler support - Complete implementation including initialization and access validation

Class Enhancements

  • Auto-accessor fields - TypeScript 4.9+ accessor keyword support
  • declare field modifier - For ambient class field declarations
  • Static blocks - Class-level static initialization blocks
  • Constructor signatures in interfaces - Enhanced type checking support
  • Function type members - Support for function-typed class members
  • Bound function constructor restriction - Enforced as per spec

Module System

  • CommonJS support - require() and module.exports syntax with module dependency management
  • Triple-slash references - /// <reference path="..." /> for script-style file concatenation
  • Module/global augmentations - Declaration merging support
  • Enhanced export handling - Improved static member resolution for imported classes

Resource Management

  • using declarations - Explicit resource management for synchronous disposables
  • await using declarations - Async resource management with proper cleanup

Type System Enhancements

  • Type predicates - x is Type return type annotations with multi-parameter narrowing
  • satisfies operator - TypeScript 4.9 expression-level type validation
  • Unique symbol types - unique symbol support with predefined well-known symbols
  • object type - Proper TypeScript object type with enhanced compatibility checks
  • Recursive type aliases - Self-referential type definitions
  • Variance annotations - in/out modifiers for generic type parameters
  • Const type parameters - const modifier for generic parameters
  • Variadic tuples - Enhanced tuple type compatibility with spread support

Language Features

  • Tagged template literals - Custom string processing with tag functions
  • String.raw - Raw string access for tagged templates
  • Named function expressions - Proper recursion and scoping for const f = function name() {}

Array Methods

  • splice() / toSpliced() - Mutable and immutable array element replacement
  • sort() / toSorted() - Mutable and immutable sorting with JS-compliant undefined handling

Testing & Quality

  • CLI integration tests - Comprehensive tests for compilation, error handling, and script execution
  • Negative compiler tests - Resilience testing against malformed input
  • Parity tests - Built-in module compatibility verification
  • End-to-end packaging tests - Full --pack workflow validation

Infrastructure Improvements

  • ClassRegistry - Refactored class member management
  • OperatorDescriptor - Centralized operator semantics with enhanced type checking
  • CommandLineParser - Proper command-line argument parsing with help messages
  • TypeScript declaration generation - Enhanced support for nested types and obsolete attributes
  • $Hash class - Standalone crypto method wrappers

Bug Fixes & Refactoring

  • Removed redundant runtime DLL copy in compiled execution
  • Improved variable type handling for self-referential callbacks
  • Normalized path separators for cross-platform compatibility
  • Simplified async evaluation methods
  • Enhanced error reporting in Lexer
  • Fixed simple class name null checks in type-checker

Full Changelog: v1.0.5...v1.0.6