JavaScript source semantics
Translate JavaScript or TypeScript module exports, data shapes, promises, errors, host-runtime assumptions, and package entrypoints into evidence-backed base or Flavor proposals. Keep runtime-specific behavior in a selected Flavor.
Preserve every observable ordering and tie-break as a separate normative rule. Name the
exact JavaScript comparator: default Array.prototype.sort compares string-converted
values by UTF-16 code units, a supplied compare function defines its own domain and
direction, and localeCompare introduces locale and option dependencies that must not
be guessed. Do not reduce any of these to generic "lexicographic" ordering. Distinguish
returned sequence order from selection tie-breaks, and cite the exact expression plus
any test evidence for each claim. Keep operand coercion, locale, stability, or host
behavior blocking when the supplied evidence does not establish it.