github vercel-labs/scriptc v0.4.14

42 minutes ago

0.4.14

Highlights

  • TypeScript parity:
    • concat whose arguments hold elements the receiver's array cannot take as they are, such as a row of strings and numbers concatenated onto a string array or a var that may still be undefined, runs as the checked-dynamic concat: it builds the mixed array JavaScript builds and appends a non-array argument as one element, instead of failing with SC1090 or SC2009.
    • A call resolved to an overload that names a subclass of the class its implementation returns, such as a DOM factory's createElement("canvas") returning the canvas element class over an element implementation, checks the value against the subclass as an assertion does instead of refusing to build; a value of another class throws the assertion's TypeError.
  • Fixes:
    • A class with static fields whose getter names a subclass declared later in the same module, used as a value from another module, no longer throws ReferenceError: Cannot access 'Element' before initialization at startup and prints what Node prints. The compiler-generated class helpers no longer receive the checks that guard a reference to a class made before its definition ran; the program's own references keep their checks.

Don't miss a new scriptc release

NewReleases is sending notifications on new releases.