ReviewOS

home-lang/home

TypeScript checker parity: eliminate the remaining 30 failures

#69
Closed chris opened this 14 days ago · 717 comments
14 days ago

Parent: #67

Scope

Make ts_checker fully green by porting the remaining TypeScript semantics and exact diagnostic behavior. Do not weaken assertions or encode fixture-specific outcomes.

Current verified state

After fixing distributive-conditional union member ownership:

  • 2,976 / 3,006 pass
  • 30 fail
  • 0 crash (down from 2 crashes)

The crash fix copies union member IDs before recursive conditional evaluation so interner reallocations cannot invalidate a borrowed slice.

Remaining failure clusters

  • Enum/member literal assignment compatibility.
  • Global-script this indexed access diagnostics.
  • Generic defaults, conditional distribution, NonNullable, mapped and template types.
  • Variadic tuple inference and callback arity.
  • Overload diagnostic anchoring and CheckJS/JSDoc arity.
  • Accessor read/write and spread typing.
  • Alias/generic-instance diagnostic rendering.
  • Recursive type depth/circular mapped diagnostics.

Completion gate

  • ./pantry/.bin/zig build test -Dfilter=ts_checker --summary failures reports 3,006 / 3,006.
  • No crash, timeout, or skipped parity assertion replaces a failure.
  • Each semantic cluster lands in a focused conventional commit with regression coverage.
14 days ago

Abstract modifier line-break parity

Pushed e25c1893d (fix(ts-parser): stop abstract modifiers at line breaks) to main.

This ports tsgo contextual-modifier scanning for abstract class: the class token must follow abstract on the same line. The rule is shared across statement dispatch, class parsing, export/decorator recovery, expression parsing, and labeled-statement detection.

For newline-separated input, Home now preserves abstract as a value expression, emits the expected unresolved-name diagnostic downstream, and parses the following class as non-abstract. This removes the two spurious abstract-instantiation errors that previously appeared for the following classes.

Attributable parity movement

  • exact passes: 5,137 -> 5,138 / 5,907 (+1, 86.98%)
  • exact failures: 770 -> 769
  • removed identity: classAbstractSingleLineDecl
  • added identities: none
  • combined local tree: 5,144 / 5,907 (87.08%), including six concurrent JSX closures not staged in this commit

Commit scope

  • packages/ts_parser/src/ts_parser.zig
  • 33 insertions, 6 deletions

Verification

  • parser: 764 / 764
  • checker: 3,158 / 3,158
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • focused fixture: 1 / 1
  • classAbstract* family: 25 / 30, with only classAbstractSingleLineDecl removed from the failure set
  • exact lower slice: 2,733 / 3,000
  • exact upper slice: 2,411 / 2,907

The full 5,907-case failure-name comparison removed exactly the targeted fixture and introduced no regressions.

14 days ago

Malformed abstract declaration recovery parity

Pushed 5f414b24c (fix(ts-parser): recover malformed abstract declarations) to main.

This ports two tsgo parser recovery decisions used by classAbstractManyKeywords:

  • a bare top-level default is a source-element list error, so Home now emits TS1005 (export expected) and continues into the following declaration;
  • an imported identifier followed by another declaration starter selects import-equals recovery when the next token is neither comma nor from, so Home emits TS1005 (= expected) and leaves the declaration starter untouched.

The second rule is bounded to declaration starters and preserves valid default imports, deferred imports, comma clauses, and from clauses. The HIR regression verifies that default abstract class C still produces an abstract class and import abstract class D preserves a separate non-abstract class declaration.

Attributable parity movement

  • exact passes: 5,138 -> 5,139 / 5,907 (+1, 87.00%)
  • exact failures: 769 -> 768
  • removed identity: classAbstractManyKeywords
  • added identities: none
  • combined local tree: 5,145 / 5,907 (87.10%), including six concurrent JSX closures not staged in this commit

Commit scope

  • packages/ts_parser/src/ts_parser.zig
  • 56 insertions, 2 deletions

Verification

  • parser: 765 / 765
  • checker: 3,158 / 3,158
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • focused fixture: 1 / 1
  • classAbstract* family: 26 / 30, with only classAbstractManyKeywords removed from the failure set
  • exact lower slice: 2,734 / 3,000
  • exact upper slice: 2,411 / 2,907

The full exact failure-name comparison removed exactly the targeted fixture and introduced no new failures.

14 days ago

Malformed try-statement recovery parity

Pushed bd6ec65cd (fix(ts-parser): recover stray try clauses) to main.

This ports tsgo malformed try-statement recovery:

  • statement dispatch now routes stray catch and finally tokens through the try parser;
  • the parser emits TS1005 (try expected), synthesizes an empty missing try block, and then consumes the real clause normally;
  • adjacent catch and finally clauses remain attached to the same recovered statement, preventing the first malformed clause from swallowing the rest of the function;
  • catch () now emits TS1003 at the closing parenthesis while preserving that token for normal header recovery.

The parser regression mirrors the complete upstream malformed shape and asserts the seven-code sequence: six missing-try/missing-clause diagnostics plus the empty-binding TS1003.

Attributable parity movement

  • exact passes: 5,139 -> 5,140 / 5,907 (+1, 87.02%)
  • exact failures: 768 -> 767
  • removed identity: invalidTryStatements
  • added identities: none
  • combined local tree: 5,146 / 5,907 (87.12%), including six concurrent JSX closures not staged in this commit

Commit scope

  • packages/ts_parser/src/ts_parser.zig
  • 46 insertions, 4 deletions

Verification

  • parser: 766 / 766
  • checker: 3,158 / 3,158
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • focused fixture: 1 / 1
  • exact lower slice: 2,734 / 3,000
  • exact upper slice: 2,412 / 2,907

The full exact failure-name comparison removed exactly invalidTryStatements and introduced no new failures.

14 days ago

Invalid deferred export recovery parity

Pushed c9c6b3e60 (fix(ts-parser): recover invalid deferred exports) to main.

This ports tsgo recovery for the invalid export defer * as ns from form:

  • export defer * now emits TS1128 and recovers the tail as ordinary statements instead of creating an expression-shaped export_decl;
  • removing that export HIR shape prevents the checker from misclassifying the recovery as an export assignment and emitting TS1203;
  • shared * as ns from statement-terminator recovery now emits the missing TS1434 at from only when import recovery has not already emitted the same code at the same position;
  • the parser regression asserts TS1128/TS1005/TS1434 and verifies no recovered top-level statement is an export_decl.

Attributable parity movement

  • exact passes: 5,140 -> 5,141 / 5,907 (+1, 87.03%)
  • exact failures: 767 -> 766
  • removed identity: exportDeferInvalid
  • added identities: none
  • combined local tree: 5,147 / 5,907 (87.13%), including six concurrent JSX closures not staged in this commit

Commit scope

  • packages/ts_parser/src/ts_parser.zig
  • 32 insertions, 0 deletions

Verification

  • parser: 767 / 767
  • checker: 3,158 / 3,158
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • focused fixture: 1 / 1
  • exact lower slice: 2,734 / 3,000
  • exact upper slice: 2,413 / 2,907

The full exact failure-name comparison removed exactly exportDeferInvalid and introduced no new failures.

14 days ago

Pushed 3d01042eac15c14c1106ff3cb627543746258ba5 (fix(ts-parser): disambiguate type-only specifiers) to main.

What changed

  • Ported the shared tsgo parseImportOrExportSpecifier ambiguity logic for contextual type and as sequences.
  • Preserved the correct imported name, public alias, and type-only phase for all four ambiguous forms, including type as, type as as, and type as as name.
  • Changed bare named-export locality checks to resolve across value, type, namespace, and alias spaces, matching the tsgo symbol mask even for type-only syntax.
  • Removed checker source-text reparsing for exported aliases; the checker now consumes the parser-owned HIR alias directly.
  • Added parser ambiguity matrices and a virtual-module checker regression covering TS1362, TS2661 suppression, and aliased export publication.
  • Flipped 189 insertions and 65 deletions across ts_parser and ts_checker.

Exact parity movement

Attributable pushed baseline:

  • Before: 5,141 / 5,907 exact fixtures passing (87.03%), 766 failures.
  • After: 5,142 / 5,907 exact fixtures passing (87.05%), 765 failures.
  • Removed failure identity: exportSpecifiers.
  • Added failure identities: none.

Combined local tree, including six concurrent JSX closures deliberately excluded from this commit:

  • 5,148 / 5,907 exact fixtures passing (87.15%), 759 failures.
  • Lower slice: 2,734 / 3,000, 266 failures.
  • Upper slice: 2,414 / 2,907, 493 failures.

Verification

  • ts_parser: 769 / 769
  • ts_checker: 3,159 / 3,159
  • Default conformance: 1,374 / 1,374
  • Smoke: 16 / 16
  • Category: 86 / 86
  • Baseline-aware: 586 / 586
  • Focused exact exportSpecifiers: 2 / 2
  • Full exact identity audit: 5,148 / 5,907 in the combined local tree

Commit author and committer are Chris <chrisbreuer93@gmail.com> with no coauthor trailers.

14 days ago

Pushed 7526fe9302e2ffe3387e96e2ca4cdbf2ae0623ad (fix(ts-checker): validate incomplete index signatures) to main.

What changed

  • Retained incomplete index-signature HIR when the key type requires semantic checker resolution instead of dropping the node after a missing result annotation.
  • Applied tsgo grammar ordering in the checker: validate the parameter key first, then report TS1021 only when the key is valid and the result annotation is missing.
  • Invalid object keys such as RegExp now produce TS1268 without an incorrect replacement TS1021.
  • Valid direct and aliased string keys still produce TS1021.
  • Preserved parser-owned TS1268/TS1337 behavior for syntactically invalid keys so no duplicate checker diagnostics are introduced.
  • Added parser incomplete-HIR coverage plus checker regressions for direct string, string alias, and object key semantics.
  • Flipped 44 insertions and 13 deletions across ts_parser and ts_checker.

Exact parity movement

Attributable pushed baseline:

  • Before: 5,142 / 5,907 exact fixtures passing (87.05%), 765 failures.
  • After: 5,143 / 5,907 exact fixtures passing (87.07%), 764 failures.
  • Removed failure identity: parserIndexSignature8.
  • Added failure identities: none.

Combined local tree, including six concurrent JSX closures deliberately excluded from this commit:

  • 5,149 / 5,907 exact fixtures passing (87.17%), 758 failures.
  • Lower slice: 2,735 / 3,000, 265 failures.
  • Upper slice: 2,414 / 2,907, 493 failures.

Verification

  • ts_parser: 769 / 769
  • ts_checker: 3,160 / 3,160
  • Default conformance: 1,374 / 1,374
  • Smoke: 16 / 16
  • Category: 86 / 86
  • Baseline-aware: 586 / 586
  • Focused exact parserIndexSignature8: 1 / 1
  • Full exact identity audit: 5,149 / 5,907 in the combined local tree

Commit author and committer are Chris <chrisbreuer93@gmail.com> with no coauthor trailers.

14 days ago

Pushed 3197770d4 (fix(ts-parser): recover malformed switch clauses) directly to main as Chris, with no coauthors.

This ports tsgo switch-clause list recovery: malformed clause tokens now advance to the next case, default, close brace, or EOF boundary; EOF blocks remain attached as partial HIR; and duplicate same-position class-close TS1005 diagnostics are suppressed. The regression verifies the recovered switch is reachable through source root -> class -> constructor -> body and retains discriminant e.

Delta: 63 insertions / 14 deletions in packages/ts_parser/src/ts_parser.zig.

Exact tsgo parity: 5,152/5,907 -> 5,154/5,907 (87.22% -> 87.25%), reducing failures 755 -> 753. Identity diff removes only:

  • parserErrorRecovery_SwitchStatement2
  • tsxErrorRecovery1

No exact failures were added.

Verification:

  • parser: 770/770
  • checker: 3,160/3,160
  • conformance: 1,374/1,374
  • smoke: 16/16
  • category: 86/86
  • baseline-aware: 586/586
  • full exact: 5,154/5,907
14 days ago

Pushed 0b18872c6 (fix(ts-checker): track try-catch assignment flow) directly to main as Chris, with no coauthors.

This ports maybe-unassigned flow through try / catch / finally: function-scoped var declarations whose initialization can be skipped seed catch-path TS2454 state, try/catch pending maps rejoin after the catch, catch parameters are removed from pending state, and finally runs over the joined state. Escaped declaration spelling is preserved in diagnostics, so \\u0078x is rendered exactly as authored.

Delta: 130 insertions / 6 deletions in packages/ts_checker/src/check.zig.

Exact tsgo parity: 5,155/5,907 -> 5,156/5,907 (87.27% -> 87.29%), reducing failures 752 -> 751. The staged-only identity diff removes only parserUnicode1; no failures were added, and the upper 2,907-fixture slice is unchanged.

Verification from the staged-index snapshot:

  • checker: 3,161/3,161
  • conformance: 1,374/1,374
  • smoke: 16/16
  • category: 86/86
  • baseline-aware: 586/586
  • full exact: 5,156/5,907
14 days ago

ES5 instance super property parity

The checker half landed on main in 046c4b080. A shared-index race caused the already-staged checker patch to be included with the JSX lexer chunk; the commit body documents the lexer half, so this comment records the omitted checker scope and its independently audited movement. The public commit remains authored and committed by Chris <chrisbreuer93@gmail.com> with no coauthor trailers.

What changed

  • super(...) in a constructor still resolves through the base constructor type.
  • super.member now passes the normalized base-instance object type into the existing ES5 TS2340 check, matching the type already used for property lookup.
  • Added a constructor regression proving super.value emits exactly one TS2340 and no TS2339.
  • Checker-attributable scope: 22 insertions / 1 deletion in packages/ts_checker/src/check.zig. The mixed commit totals 42 insertions / 1 deletion across checker and lexer.

Exact tsgo parity movement (isolated staged snapshot against parent c1c1b3667)

  • passes: 5,156 -> 5,158 / 5,907 (+2, 87.29% -> 87.32%)
  • failures: 751 -> 749
  • removed identities: parserAstSpans1, errorSuperPropertyAccess
  • added identities: none
  • lower slice: 2,738 / 3,000
  • upper slice: 2,420 / 2,907

The second flip is the same logical rule in a separate canonical fixture, not a fixture-name special case.

Verification

  • focused parserAstSpans1: 1 / 1
  • checker: 3,161 / 3,161
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • full exact identity audit: 5,158 / 5,907, with exactly the two removals above and zero additions

The concurrent JSX batch in #70 closes six additional fixtures beyond this isolated attributable snapshot; I am refreshing the clean-HEAD 5,907-case baseline before the next parity chunk.

14 days ago

Missing arrow-body brace recovery parity

Pushed 606c36fd8 (fix(ts-parser): recover missing arrow body braces) directly to main. The commit is authored and committed by Chris <chrisbreuer93@gmail.com> with no coauthor trailers.

What changed

  • Ported tsgo parseArrowFunctionExpressionBody's statement-only recovery: a => var ... } now selects a function block with IgnoreMissingOpenBrace semantics instead of falling into expression parsing.
  • The missing { produces canonical TS1005 at the first body token without consuming it.
  • Body statements are retained through the real }, so the checker sees the recovered var / return HIR and emits the expected downstream diagnostics.
  • Ordinary blocks retain matched-brace related information; synthesized-open recovery does not invent an opener relation.
  • Replaced the stale TS1109-only regression with the recovered block behavior.

Scope

  • packages/ts_parser/src/ts_parser.zig
  • 75 insertions / 22 deletions

Exact tsgo parity movement

  • passes: 5,170 -> 5,171 / 5,907 (87.52% -> 87.54%)
  • failures: 737 -> 736
  • removed identity: parserMissingLambdaOpenBrace1
  • added identities: none
  • lower slice: 2,739 / 3,000
  • upper slice: 2,432 / 2,907

Verification

  • parser: 770 / 770
  • checker: 3,162 / 3,162
  • focused exact fixture: 1 / 1
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • full 5,907-case identity audit: only the targeted parser failure was removed by this chunk; no failures were added.
14 days ago

Nested-parenthesis arrow disambiguation parity

Pushed d7c20337d (fix(ts-parser): disambiguate nested paren arrow heads) directly to main as Chris <chrisbreuer93@gmail.com>, with no coauthor trailers.

What changed

  • Ported tsgo's speculative allowAmbiguity=false parameter-name gate for identifier-first parenthesized arrow candidates.
  • A later top-level parameter position beginning with bare ( now aborts the speculative arrow and rewinds, because only identifiers and binding patterns can start parameters.
  • (a, (b, c)) => ... therefore recovers as parenthesized/comma expressions instead of an invented arrow with TS1003.
  • Parenthesis/bracket/brace depth tracking preserves valid parenthesized default expressions; definite typed/rest arrows remain committed.
  • Added a regression asserting the initializer is not an arrow, TS1003 is absent, and canonical TS1005 semicolon recovery is retained.

Scope

  • packages/ts_parser/src/ts_parser.zig
  • 70 insertions / 0 deletions

Exact tsgo parity movement

  • passes: 5,171 -> 5,172 / 5,907 (87.54% -> 87.56%)
  • failures: 736 -> 735
  • removed identity: parser512325
  • added identities: none
  • lower slice: 2,740 / 3,000
  • upper slice: 2,432 / 2,907, failure identities unchanged

Verification

  • parser: 771 / 771
  • checker: 3,162 / 3,162
  • focused exact fixture: 1 / 1
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • full 5,907-case identity audit: only parser512325 was removed; zero additions.
14 days ago

Pushed c48a9694f (fix(ts-parser): preserve malformed try recovery) to main.

This ports tsgo recovery for the malformed parserFuzz1 statement sequence:

  • emits TS1434 at the preceding identifier boundary for _ static
  • consumes only the stray static with TS1128 so the following try remains parseable
  • synthesizes an empty try block when { is missing
  • suppresses the resulting catch/finally cascade
  • deduplicates the same-position EOF close-brace diagnostic after the missing-open-brace report
  • adds a focused parser regression for the exact recovery path

Parity movement (full canonical exact identity audit):

  • before: 5,172 / 5,907 (87.56%), 735 failures
  • after: 5,173 / 5,907 (87.57%), 734 failures
  • removed: parserFuzz1
  • added failures: none
  • exact shards: lower 2,741 / 3,000, upper 2,432 / 2,907

Verification:

  • focused fixture: 1 / 1
  • parser package: 772 / 772
  • checker package: 3,162 / 3,162
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • exact identity: 5,173 / 5,907

Scope: 46 insertions, 5 deletions in packages/ts_parser/src/ts_parser.zig. Authored and committed as Chris with no coauthors.

14 days ago

Pushed d568e2fe5 (fix(ts-parity): recover object literal class bases) to main.

This ports the tsgo heritage-clause recovery needed by the two classExtendsEveryObjectType fixtures:

  • treats { ... } after extends as an object-literal base when tsgo lookahead says it is not the class body
  • preserves bare extends {} as an empty heritage list
  • reports the object-list missing comma at the malformed semicolon
  • lets interface bases defer exclusively to TS2689 instead of adding TS2507
  • renders runtime namespace bases as typeof N for TS2507
  • uses the heritage-context never[] display for empty array bases
  • adds focused parser and checker regressions

Canonical exact movement, measured against a clean current-main parent after separating concurrent JSX progress:

  • before: 5,178 / 5,907 (87.66%), 729 failures
  • after: 5,180 / 5,907 (87.69%), 727 failures
  • removed: classExtendsEveryObjectType, classExtendsEveryObjectType2
  • added failures: none
  • exact shards: lower 2,743 / 3,000, upper 2,437 / 2,907
  • upper-shard failure identity: unchanged

Verification:

  • focused fixtures: 2 / 2
  • parser package: 773 / 773
  • checker package: 3,163 / 3,163
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • exact identity: 5,180 / 5,907

Scope: 82 insertions, 5 deletions across packages/ts_parser/src/ts_parser.zig and packages/ts_checker/src/check.zig. Authored and committed as Chris with no coauthors.

14 days ago

Pushed 73d2ff0f7 (fix(ts-parser): preserve template key recovery) to main.

This ports the tsgo variable-list recovery used after a malformed template-literal object key:

  • routes a literal after an initializer colon away from the generic arrow-return-type scanner
  • emits TS1134 at the malformed declarator literal
  • leaves the closing brace for source-element TS1128 recovery
  • removes the duplicate unreachable template-tail branch
  • adds a focused parser regression for the TS1136, TS1005, TS1134, TS1128 sequence

Canonical exact movement, audited in a clean worktree to exclude a concurrent uncommitted JSX checker patch:

  • before: 5,180 / 5,907 (87.69%), 727 failures
  • after: 5,186 / 5,907 (87.79%), 721 failures
  • removed: templateStringInObjectLiteral, templateStringInObjectLiteralES6, templateStringInPropertyName1, templateStringInPropertyName2, templateStringInPropertyNameES6_1, templateStringInPropertyNameES6_2
  • added failures: none
  • exact shards: lower 2,743 / 3,000, upper 2,443 / 2,907
  • lower-shard failure identity: unchanged

Verification:

  • focused fixtures: 6 / 6
  • parser package: 774 / 774
  • checker package: 3,163 / 3,163
  • default conformance: 1,374 / 1,374
  • smoke: 16 / 16
  • category: 86 / 86
  • baseline-aware: 586 / 586
  • exact identity: 5,186 / 5,907

Scope: 37 insertions, 30 deletions in packages/ts_parser/src/ts_parser.zig. Authored and committed as Chris with no coauthors.

14 days ago

Pushed 66a38964e (fix(ts-parser): check assignment rest commas) directly to main as Chris with no coauthor trailers.

This ports tsgo assignment-pattern grammar handling for trailing commas after final array and object rest elements. Home now traverses nested destructuring targets at the plain-assignment boundary, locates the retained comma token before the pattern delimiter, and reports TS1013 there. Ordinary spread literals such as [...a,] and {...b,} remain legal.

Parity movement:

  • Exact corpus: 5,186/5,907 (87.79%) -> 5,187/5,907 (87.81%)
  • Failures: 721 -> 720
  • Flipped fixture: trailingCommasInBindingPatterns
  • Exact lower half: 2,743/3,000; all 257 failure identities unchanged
  • Exact upper half: 2,444/2,907; removed exactly trailingCommasInBindingPatterns, added none
  • Change size: 71 insertions in one parser file, including focused legal-literal regression coverage

Verification:

  • parser suite: pass
  • checker suite: pass
  • focused exact fixture: 1/1
  • smoke: 16/16
  • categories: 86/86
  • baseline-aware: 586/586
  • full exact identity audit: 5,187/5,907

Current exact parity is 87.81%, with 720 fixtures remaining.

14 days ago

Pushed c6650076b (fix(ts-parity): preserve missing parameter order) directly to main as Chris with no coauthor trailers.

This matches tsgo recovery ordering when a template token appears where a function parameter name is required. Home now prioritizes same-position TS7006 before TS1003 in both the compiler diagnostic merge and the exact-conformance formatter. A driver regression covers the recovered missing parameter.

Parity movement attributable to this commit:

  • Flipped templateStringInFunctionParameterType
  • Flipped templateStringInFunctionParameterTypeES6
  • Canonical exact corpus: 5,187/5,907 (87.81%) -> 5,189/5,907 (87.84%)
  • Canonical failures: 720 -> 718
  • Lower half: 2,743/3,000 with no failure-identity movement
  • Clean upper attribution: 2,444 -> 2,446 passes, with exactly the two template fixtures removed and no additions
  • Change size: 40 insertions across driver and conformance

Shared-tree attribution note: the full main-folder audit observed 5,191/5,907 because the separate unstaged checker work also flipped checkJsxChildrenCanBeTupleType and checkJsxChildrenProperty5. Those two checker changes are not part of this commit and are not included in the canonical movement above.

Verification:

  • driver suite: pass
  • focused exact pair: 2/2
  • smoke: 16/16
  • categories: 86/86
  • baseline-aware: 586/586
  • exact lower: 2,743/3,000
  • shared exact upper: 2,448/2,907, with identity attribution above
  • checker suite: 3,162/3,164; the two failures are deliberate expect(false) marker tests in the unrelated unstaged checker file (circularBaseConstraint and attrRes12)

Canonical committed parity is now 87.84%, with 718 fixtures remaining.

14 days ago

Pushed 3b20dbb33 (fix(ts-parser): recover let array ambiguity) directly to main as Chris with no coauthor trailers.

This ports tsgo recovery for the same-line let [ lexical-declaration ambiguity. Invalid numeric array bindings now retain TS1181 and continue through TS1005 at the closing bracket and TS1128 at the assignment token, while consuming the recovered tail. Home also defers strict-reserved TS1212 for var let until parsing completes and suppresses it when a true parse diagnostic exists, and the driver now suppresses checker TS1182 under the same hasParseDiagnostics contract.

Parity movement attributable to this commit:

  • Flipped VariableDeclaration13_es6
  • Canonical exact corpus: 5,189/5,907 (87.84%) -> 5,190/5,907 (87.86%)
  • Canonical failures: 718 -> 717
  • Lower half: 2,743/3,000 with no failure-identity movement
  • Upper attribution: removed exactly VariableDeclaration13_es6, with no attributable additions
  • Change size: 129 insertions across parser and driver

Shared-tree attribution note: the upper total remained 2,448/2,907 because the separate unstaged checker work concurrently added checkJsxChildrenCanBeTupleType while this patch removed VariableDeclaration13_es6. That checker movement is not part of this commit.

Verification:

  • parser suite: pass
  • driver suite: pass
  • focused exact fixture: 1/1
  • smoke: 16/16
  • categories: 86/86
  • baseline-aware: 586/586
  • exact lower: 2,743/3,000
  • shared exact upper: 2,448/2,907, with identity attribution above
  • checker suite: 3,162/3,164; the two failures remain deliberate expect(false) markers in the unrelated unstaged checker file

Canonical committed parity is now 87.86%, with 717 fixtures remaining.

14 days ago

Pushed 19447985db998805503877c30ee8481c143e3109 directly to main as Chris, with no coauthor: fix(ts-parser): recover object postfix markers.

This ports tsgo object-literal shorthand recovery for postfix !: the parser now consumes the marker after a shorthand key, reports TS1255 at that token, and keeps parsing so a following optional object method still reports the existing TS1162 diagnostic.

Parity movement:

  • canonical exact: 5,190/5,907 (87.86%) -> 5,191/5,907 (87.88%)
  • remaining failures: 717 -> 716
  • exact fixture flipped: definiteAssignmentAssertionsWithObjectShortHand
  • lower shard: 2,743/3,000, identical failure identities
  • upper shard: 2,449/2,907 in the shared tree; compared with the immediately preceding shared set, it removes exactly this fixture and adds none
  • change size: 19 insertions in one parser file

Verification completed:

  • parser suite passes
  • focused exact fixture: 1/1
  • smoke: 16/16
  • category checks: 86/86
  • baseline-aware checks: 586/586
  • both exact shards completed

The checker suite is independently at 3,162/3,164 because the unrelated unstaged checker work contains two deliberate expect(false) marker tests; this parser commit does not touch that file. Canonical parity now stands at 87.88% with 716 fixtures remaining.

14 days ago

Pushed a07e1d94cb2352926a6fc7860f17cac4aff8d267 directly to main as Chris, with no coauthor: fix(ts-parser): preserve missing comma operands.

This ports tsgo comma-expression recovery for absent operands. Home now keeps (x, ), (, x), and ( , ) as comma binary expressions with checker-neutral zero-width recovery operands, emits TS1109 at each missing side, and preserves tsgo's TS2695-before-TS1109 ordering when both diagnostics share a position. The focused fixture now matches all 23 upstream diagnostics exactly.

Parity movement:

  • canonical exact: 5,191/5,907 (87.88%) -> 5,192/5,907 (87.90%)
  • remaining failures: 716 -> 715
  • exact fixture flipped: commaOperatorWithoutOperand
  • lower shard: 2,743/3,000, identical failure identities
  • upper shard: 2,450/2,907, removed exactly this fixture and added none
  • change size: 73 insertions, 3 deletions across parser, driver, and exact formatter

Verification completed:

  • parser suite passes
  • driver suite passes
  • focused exact fixture: 1/1, all 23 diagnostics matched
  • smoke: 16/16
  • named categories: 86/86
  • baseline-aware: 586/586
  • both exact shards completed

The unrelated unstaged checker work currently reports 3,162/3,165: two deliberate expect(false) marker tests and one JSX shorthand regression. This commit does not stage or modify that checker file. Canonical exact parity now stands at 87.90% with 715 fixtures remaining.

14 days ago

Pushed 1eb46f1ce86987fc8dfcfab0d8623ece5666b8e8 directly to main as Chris, with no coauthor: fix(ts-parser): retain malformed generator methods.

This ports tsgo class-member recovery after a leading generator marker. A truly bodyless malformed method such as *foo now remains in HIR after TS1005, preserving its name and generator flags so the existing checker naturally emits TS2391 and TS7010. The recovery is bounded to bodyless member boundaries, so malformed async * get/set/property tails keep their upstream diagnostics without synthetic overload noise.

Parity movement:

  • canonical exact: 5,192/5,907 (87.90%) -> 5,193/5,907 (87.91%)
  • remaining failures: 715 -> 714
  • exact fixture flipped: MemberFunctionDeclaration6_es6
  • lower parser identity set: unchanged after narrowing
  • upper parser identity set: removed exactly this fixture, no parser-owned additions
  • change size: 34 insertions, 2 deletions in one parser file

Verification completed:

  • parser suite passes
  • focused MemberFunctionDeclaration6_es6 plus parser.asyncGenerators.classMethods.es2018: 2/2 exact
  • smoke: 16/16
  • named categories: 86/86
  • baseline-aware: 586/586
  • full exact lower: 2,743/3,000
  • full exact upper: 2,440/2,907 in the shared checker snapshot

The upper shared count includes 11 unrelated JSX failure identities introduced by the concurrently edited unstaged checker file. Its current suite state is 3,162/3,166, with three deliberate expect(false) probes plus one JSX shorthand regression. This commit neither stages nor modifies that checker file. Canonical exact parity attributable to committed work now stands at 87.91% with 714 fixtures remaining.

14 days ago

Pushed aa52fbf0601e49c62dfd38670ae3e17e0232298f directly to main as Chris (no coauthor): fix(ts-driver): normalize JavaScript type imports.

This ports the structured TS8006 distinction for JavaScript type-only imports. Statement-level import type A diagnostics now anchor at the import keyword and use the upstream 'import type' declarations wording, while specifier-level import { type A } keeps the existing import...type diagnostic.

Parity movement:

  • Canonical exact: 5,193/5,907 (87.91%) -> 5,194/5,907 (87.93%)
  • Canonical failures: 714 -> 713
  • Flipped exactly: grammarErrors
  • Lower shard: 2,743/3,000, unchanged fixture identities
  • Upper shard: 2,440/2,907 -> 2,441/2,907, removing exactly grammarErrors and adding no failures

Change size: 34 insertions, 3 deletions in one driver file.

Verification completed:

  • ts_driver suite: pass
  • focused exact grammarErrors: 1/1
  • smoke: 16/16
  • category representatives: 86/86
  • baseline-aware subset: 586/586
  • full exact before/after identity audit across both shards: pass

The unrelated unstaged checker work was last independently observed at 3,162/3,166, with three deliberate expect(false) probes plus one JSX shorthand regression; it was neither staged nor included here. Canonical parity is now 87.93%, with 713 fixtures remaining.

14 days ago

Pushed e28ebc91b32d233cc81f7caab0112b28e55d129a directly to main as Chris (no coauthor): fix(ts-checker): preserve constructor minimum arity.

This finishes newOperatorErrorCases logically. The parser now retains tsgo's recovered 32, '' comma expression after var b = new C0 32, which exposes the later diagnostics instead of aborting the file. The remaining mismatch was semantic: when Home rebuilt a class constructor as the static-side __construct signature, it copied rest metadata and parameter names but dropped minRequiredArgumentCount. The checker now propagates rest and minimum-arity metadata from either the explicit or inherited constructor in both initial and refined static-type rebuilds. As a result, constructor(value?: T) accepts both new C<T> and new C<T>(), while a required constructor still reports TS2554.

Parity movement:

  • Canonical exact: 5,184/5,907 (87.76%) -> 5,185/5,907 (87.78%)
  • Canonical failures: 723 -> 722
  • Flipped exactly: newOperatorErrorCases
  • Lower shard: 2,743/3,000, identical failure identities
  • Upper shard: 2,441/2,907 -> 2,442/2,907, removing exactly newOperatorErrorCases and adding no failures

Change size: 38 insertions, 12 deletions in one checker file.

Verification completed:

  • focused exact filter: 2/2
  • ts_parser suite: pass
  • ts_driver suite: pass
  • standard conformance gate: pass
  • full exact before/after identity audit across both shards: pass
  • ts_checker: 3,163/3,167; the new optional-versus-required constructor regression test passes, while the same four pre-existing failures remain (one JSX shorthand regression and three deliberate expect(false) probes)

History note: the prerequisite parser recovery and its parser test were swept into the pre-existing broad f4a91774e WIP commit by external worktree activity before this isolated checker commit. I did not rewrite shared main; this commit is the clean semantic completion and the exact audit above measures its standalone impact. Current canonical parity is 87.78%, with 722 fixtures remaining.

14 days ago

Parity update: missing variable-declaration commas

Pushed 6860dc082 (fix(ts-parser): recover missing variable commas) directly to main.

What changed

  • Mirrored tsgo's delimited variable-declaration recovery when another binding starts on the same line without a comma.
  • Covered contextual keywords, private identifiers, object patterns, and array patterns using tsgo's binding-start rules.
  • Added the expected TS1005 ',' expected. at each missing separator.
  • Gave unannotated recovered bindings a synthetic recovery any type, matching tsgo's resulting types and preventing spurious TS7034 noImplicitAny diagnostics.
  • Preserved any real annotation or initializer that follows a recovered binding.
  • Added a parser regression for var y: z is number;, including declaration shape, recovered any types, diagnostic codes, and exact positions.

Canonical movement

  • Fixed exactly: typePredicateOnVariableDeclaration02
  • Lower shard: 2,743/3,000 -> 2,743/3,000
  • Upper shard: 2,442/2,907 -> 2,443/2,907
  • Overall: 5,185/5,907 (87.78%) -> 5,186/5,907 (87.80%)
  • Remaining failures: 722 -> 721
  • Added failures: none

Validation

  • Focused exact fixture: pass
  • Parser: 779/779
  • Driver: pass
  • Standard conformance: 586/586
  • Checker: 3,163/3,167, unchanged known baseline (one JSX failure plus three deliberate scratch probes)
  • Full before/after failure-identity audit completed across both shards
  • Change size: 1 file, 87 insertions, 15 deletions
14 days ago

Parity update: typed non-generic calls with explicit type arguments

Pushed 696ca6a76 (fix(ts-checker): classify typed calls with type arguments) directly to main.

What changed

  • Resolved explicit-type-argument calls through declared local function and arrow signatures.
  • Preferred named class/interface method signatures when member access initially resolves through an any-like value surface.
  • Emitted TS2558 (Expected 0 type arguments, but got 1.) for typed non-generic callees, anchored at the explicit type argument.
  • Preserved TS2347 for genuinely untyped any, Function, and Function-subtype callees, even when an internal fallback call signature exists.
  • Added a mixed regression covering local functions, arrows, callable declarations, class methods, interface methods, and a true any callee.

Canonical movement

  • Fixed exactly: callNonGenericFunctionWithTypeArguments
  • Fixed exactly: callGenericFunctionWithIncorrectNumberOfTypeArguments
  • Lower shard: 2,743/3,000 -> 2,745/3,000
  • Upper shard: 2,443/2,907 -> 2,443/2,907 with identical failure names
  • Overall: 5,186/5,907 (87.80%) -> 5,188/5,907 (87.83%)
  • Remaining failures: 721 -> 719
  • Added failures: none

Validation

  • Focused target fixture: pass
  • Focused functionCalls TS2347 guard: pass
  • Driver: pass
  • Standard conformance: 586/586
  • Checker: 3,164/3,168, same four known failures (one JSX failure plus three deliberate scratch probes)
  • Full before/after failure-identity audit completed across both shards
  • Change size: 1 file, 37 insertions, 1 deletion
14 days ago

Parity update: value suggestions in class heritage

Pushed 8af5bb7d8 (fix(ts-checker): suggest values in class heritage) directly to main.

What changed

  • Routed unresolved extends identifiers through the normal value-position spelling suggestion resolver.
  • class C extends Undefined {} now emits TS2552 with Did you mean 'undefined'?.
  • Void and Null heritage names remain plain TS2304 misses.
  • Added a regression covering all three distinctions.

Canonical movement

  • Fixed exactly: classExtendingPrimitive
  • Lower shard: 2,745/3,000 -> 2,746/3,000
  • Upper shard: 2,443/2,907 -> 2,443/2,907 with identical failure names
  • Overall: 5,188/5,907 (87.83%) -> 5,189/5,907 (87.85%)
  • Remaining failures: 719 -> 718
  • Added failures: none

Validation

  • Focused filter passed both matched class-extending-primitive fixtures
  • Checker: 3,165/3,169, same four known failures
  • Full before/after failure-identity audit completed across both shards
  • Change size: 1 file, 26 insertions, 1 deletion
14 days ago

TypeScript parity batch: ES5 iteration + constructor diagnostics

Pushed two small conventional commits directly to main as Chris, with no coauthor trailers.

7f91497af fix(ts-checker): enforce ES5 for-of iteration rules

  • Distinguishes ES5 array/string traversal from arbitrary synchronous iterables.
  • Honors downlevelIteration.
  • Reports the rejected constituent of mixed iterable unions.
  • Validates writable member and element-access loop targets against the iteration element type.
  • Recognizes Home checker synthetic Map/Set iterator shapes without treating async iterables as sync iterables.
  • Delta: 1 file, 137 insertions, 3 deletions.
  • Exact parity: 5,189/5,907 (87.84%) -> 5,195/5,907 (87.95%); failures 718 -> 712.
  • Flipped exactly 6 fixtures, with no added failures:
    • ES5For-of8
    • ES5For-of34
    • ES5For-ofTypeCheck7
    • ES5For-ofTypeCheck10
    • ES5For-ofTypeCheck13
    • ES5For-ofTypeCheck14

f09dbff45 fix(ts-checker): stop after constructor arity errors

  • Keeps TS2554 authoritative for too-few constructor arguments instead of cascading into TS2345 on supplied arguments.
  • Delta: 1 file, 14 insertions.
  • Exact parity: 5,195/5,907 (87.95%) -> 5,196/5,907 (87.96%); failures 712 -> 711.
  • Flipped exactly derivedClassWithoutExplicitConstructor3, with no added failures.

Validation

  • Exact lower shard: 2,747/3,000 passed, 253 failed.
  • Exact upper shard: 2,449/2,907 passed, 458 failed.
  • Canonical total: 5,196/5,907 passed (87.96%), 711 failed.
  • Full identity diff: 7 removed failures, 0 added failures.
  • Standard conformance: 586/586.
  • Checker: 3,170/3,174; only the same 4 known JSX/scratch probes fail.
  • Focused ES5 type-check family: 6/6.
  • Focused async-iterable guard: 1/1.
  • zig fmt and git diff --check clean for touched code.

This batch intentionally ran the expensive exact corpus only after grouping the logical fixes, then repeated the full identity pair after correcting the async/sync iterable distinction.

14 days ago

TypeScript parity: ambient SymbolConstructor variable merges

Pushed ff6077d2e (fix(ts-checker): merge global Symbol declarations) directly to main as Chris, with no coauthor trailers.

  • Compares top-level user var Symbol: T declarations against the ambient SymbolConstructor before ordinary same-source variable redeclaration tracking.
  • Preserves the valid var Symbol: SymbolConstructor merge.
  • Uses the shared TS2403 formatter for any and object annotations, including exact structural type text.
  • Delta: 1 file, 48 insertions.

Exact parity movement:

  • Upper shard: 2,449/2,907 -> 2,453/2,907.
  • Canonical: 5,196/5,907 (87.96%) -> 5,200/5,907 (88.03%).
  • Failures: 711 -> 707.
  • Flipped exactly 4 fixtures, with no added failures:
    • ES5SymbolProperty3
    • ES5SymbolProperty4
    • ES5SymbolProperty5
    • ES5SymbolProperty7

Validation:

  • Focused ES5SymbolProperty*: 16/16.
  • Exact upper-shard identity audit: 4 removed failures, 0 added.
  • Checker: 3,171/3,175; only the same 4 known JSX/scratch probes fail.
  • zig fmt and git diff --check clean for touched code.
14 days ago

TypeScript parity: runtime import-equals merge resolution

Pushed 1bb04bcf3 (fix(ts-checker): resolve runtime import-equals merges) directly to main as Chris, with no coauthor trailers.

  • Qualified import-equals resolution now checks sibling declarations when the first resolved target is the type-only namespace half of a merged symbol.
  • A sibling class/function/enum/runtime namespace makes the imported alias value-bearing, so the existing import/local conflict pass emits TS2440.
  • Genuinely type-only aliases remain unchanged.
  • Delta: 1 file, 41 insertions, 1 deletion.

Exact parity movement:

  • Upper shard: 2,453/2,907 -> 2,454/2,907.
  • Canonical: 5,200/5,907 (88.03%) -> 5,201/5,907 (88.05%).
  • Failures: 707 -> 706.
  • Flipped exactly shadowedInternalModule, with no added failures.

Validation:

  • Exact upper-shard identity audit: 1 removed failure, 0 added.
  • Checker before removing an unchanged const-enum experiment: 3,173/3,177; only the same 4 known JSX/scratch probes fail, and the retained import-equals regression passed.
  • The unproven const-enum experiment and its legacy-route-only test were removed before commit.
  • zig fmt and git diff --check clean for touched code.
14 days ago

JSX definite-assignment parity

Pushed d3870d6 (fix(ts-checker): track JSX spread reads).

  • Ported JSX traversal into the TS2454 flow scan: tags, attributes, spread attributes, fragments, expression children, and nested children now participate in definite-assignment analysis.
  • Matched tsgo evolving-any ownership for a binding whose only read is an invalid JSX spread: TS2698 remains at the operand and the declaration no longer adds TS7034.
  • Added focused regressions for typed JSX spread reads and invalid evolving-any spreads.

Exact movement:

  • upper shard: 2,454/2,907 -> 2,459/2,907
  • canonical: 5,201/5,907 (88.05%) -> 5,206/5,907 (88.14%)
  • failures: 706 -> 701
  • no added failure identities

Flipped exactly 5 fixtures:

  • correctlyMarkAliasAsReferences1
  • correctlyMarkAliasAsReferences2
  • correctlyMarkAliasAsReferences3
  • correctlyMarkAliasAsReferences4
  • tsxSpreadChildren

Validation: full upper exact shard 2,459/2,907, standard conformance 586/586, and the combined checker run retained only the four known failures.

14 days ago

Qualified call-cascade parity

Pushed 717a41c (fix(ts-checker): suppress missing-member call cascades).

  • Extended the existing TS2339/TS2347 ownership rule through wrapped call and new-expression callees, including explicit instantiation expressions.
  • Added an end-of-check callee-span reconciliation for namespace member diagnostics that finalize after the call path has emitted its fallback.
  • Added a regression covering new A.Hidden<string>() when Hidden is private to the namespace.

Exact movement:

  • lower shard: 2,747/3,000 -> 2,748/3,000
  • canonical after both commits: 5,207/5,907 (88.15%)
  • failures after both commits: 700
  • no added failure identities in either full shard

Flipped exactly:

  • ModuleWithExportedAndNonExportedClasses

Validation after the combined batch:

  • lower exact shard: 2,748/3,000
  • upper exact shard: 2,459/2,907
  • checker: 3,175/3,179, with only the known JSX shorthand failure and three deliberate scratch probes
  • standard conformance: 586/586

I also investigated the two missing TS2454 diagnostics in mergedInterfacesWithMultipleBases{,2}. A declaration-type hypothesis produced no gain under the program driver and was removed before commit; no speculative code was retained.

14 days ago

Pushed two conventional commits directly to main as Chris (no coauthors):

  • e3e2015a4 fix(ts-checker): compare merged interface bases

    • Resolves bare type annotations lexically before the name-only generic alias cache.
    • Aggregates inherited bases across merged interface declarations and class/interface merges.
    • Preserves private member declaration origin during inherited-property identity checks.
    • Allows merged interface members to satisfy abstract class bases.
    • Suppresses downstream TS2420 cascades once the target interface has TS2320.
    • Adds five focused checker regressions.
    • Attributed exact movement: 5,207/5,907 -> 5,214/5,907 (700 -> 693 failures).
  • ac306c18d fix(ts-checker): validate JSX attribute bags by member

    • Replaces the generic whole-object veto with JSX-aware member validation.
    • Checks spread-provided properties and string index signatures recursively through unions/intersections.
    • Keeps required/excess checks authoritative for props intersections such as Props & { children?: ReactNode }.
    • Attributed exact movement: 5,214/5,907 -> 5,221/5,907 (693 -> 686 failures).

Final exact corpus measurement:

  • Lower shard: 2,748/3,000 (unchanged)
  • Upper shard: 2,473/2,907 (was 2,459/2,907)
  • Combined: 5,221/5,907 = 88.39%
  • Remaining failures: 686
  • Identity delta: 14 fixed, 0 added

Fixed exact identities:

  • checkJsxChildrenProperty3
  • interfaceWithMultipleBaseTypes
  • mergedInheritedMembersSatisfyAbstractBase
  • mergedInterfacesWithInheritedPrivates3
  • mergedInterfacesWithMultipleBases
  • mergedInterfacesWithMultipleBases2
  • mergedInterfacesWithMultipleBases4
  • tsxDefaultAttributesResolution1
  • tsxDefaultAttributesResolution2
  • tsxSpreadAttributesResolution3
  • tsxSpreadAttributesResolution8
  • tsxSpreadAttributesResolution9
  • tsxUnionTypeComponent1
  • twoMergedInterfacesWithDifferingOverloads2

Verification:

  • Checker: 3,181/3,184; the only failures are the three deliberate expect(false) scratch probes.
  • The prior real checker failure, JSX shorthand attribute is true literal, now passes.
  • mergedInterfacesWithMultipleBases*: 4/4 exact.
  • mergedInterfacesWithInheritedPrivates3, mergedInheritedMembersSatisfyAbstractBase, twoMergedInterfacesWithDifferingOverloads2, and tsxAttributeErrors: exact.
  • Standard conformance build/run passed.
  • git diff --check passed.

Canonical upstream remains tsgo: _submodules/typescript-go -> https://github.com/microsoft/typescript-go.git, tracking main.

14 days ago

Pushed b20af6960 (fix(ts-checker): complete declaration merges) directly to main as Chris, with no co-authors.

What changed

  • Complete later same-scope interface arms before reads inside reopened namespace bodies, with source-order backpatching.
  • Preserve index-only interface declaration merges only for exact root-level declaration peers, avoiding cross-namespace generic cache contamination.
  • Validate merged string/number/member index compatibility at the source declaration that owns each member/indexer.
  • Preserve inherited private member declaration identity through implements checks and member access.
  • Let subclasses inherit the completed same-symbol class/interface shape through an identity-keyed heritage map without replacing nominal class identity.

Parity movement

  • Exact total: 5,221 -> 5,229 / 5,907 (88.39% -> 88.52%)
  • Failures: 686 -> 678
  • Lower shard: 2,748 -> 2,749 / 3,000 (252 -> 251 failures)
  • Upper shard: 2,473 -> 2,480 / 2,907 (434 -> 427 failures)
  • 8 exact fixtures fixed, 0 added failures

Fixed identities:

  • mergedInheritedClassInterface
  • implementingAnInterfaceExtendingClassWithPrivates
  • implementingAnInterfaceExtendingClassWithPrivates2
  • mergeThreeInterfaces2
  • mergeTwoInterfaces2
  • mergedInterfacesWithIndexers2
  • mergedInterfacesWithInheritedPrivates
  • mergedInterfacesWithInheritedPrivates2

Verification

  • Checker: 3,185 / 3,188; only the 3 deliberate expect(false) scratch probes fail.
  • Merge-focused exact corpus: 20 / 20.
  • Indexer2 regression sentinels: 8 / 8.
  • Full lower and upper exact shards completed with no added failure identities.
  • zig fmt and git diff --check clean.
  • Scope: 1 file, +414/-18.

The TypeScript submodule remains configured at _submodules/typescript-go with https://github.com/microsoft/typescript-go.git and branch main.

14 days ago

Pushed 06242bcf3 (fix(ts-checker): preserve protected member identity) directly to main.

This batch ports nominal protected-member behavior from tsgo into the Home checker:

  • resolves interface-inherited protected access through the member declaring class
  • rejects unrelated public/protected lookalikes in implements
  • permits public widening overrides from real subclasses
  • rejects protected source members for public interface requirements
  • compares inherited protected properties by declaration identity
  • matches right-to-left class-base diagnostic ordering

Exact parity movement against a same-corpus control binary:

  • total: 5,228 -> 5,231 / 5,907 (88.51% -> 88.56%)
  • failures: 679 -> 676
  • upper: 2,479 -> 2,482 / 2,907, 3 fixed, 0 added
  • lower: unchanged at 2,749 / 3,000, identical 251-failure set

Fixtures flipped:

  • implementingAnInterfaceExtendingClassWithProtecteds
  • interfaceExtendingClassWithPrivates2
  • interfaceExtendingClassWithProtecteds2

Validation:

  • checker: 3,187 / 3,190; only the 3 intentional scratch probes fail
  • focused class-heritage family: 6 / 7; the sole remaining failure (implementingAnInterfaceExtendingClassWithPrivates2) is reproduced by the prior cached binary against the current corpus
  • source delta: 1 checker file, +101/-1

The earlier recorded upper baseline was 2,480; a same-corpus run of the prior binary is now 2,479, so the commit delta above uses the apples-to-apples current-state control.

14 days ago

Namespace type identity checkpoint

Pushed 2dda8752468f533a434c8278d73be1a1581f7b4a (fix(ts-checker): isolate namespace type identities) directly to main, authored and committed solely as Chris.

What changed

  • Scoped generic interface instantiation metadata by declaration instead of relying on the last bare-name registration.
  • Carried the originating interface declaration onto concrete generic instances so member refreshes stay in the correct namespace.
  • Preserved legitimate same-scope generic interface declaration merges by back-patching metadata across the complete merge group.
  • Gated class/interface member fallback on a real same-scope merge or a string-literal ambient module augmentation.
  • Used namespace variable annotation spelling for TS2339 target text where structural interning no longer preserves the local name.
  • Added checker regressions for nested same-named generic interfaces and classes.

Exact parity movement

  • Fixed implementingAnInterfaceExtendingClassWithPrivates2.
  • Fixed twoInterfacesDifferentRootModule2.
  • Added failures: 0.
  • Exact conformance: 5,231/5,907 -> 5,233/5,907 (88.59%).
  • Remaining exact failures: 674.

Validation

  • Lower shard: 2,749/3,000, identical 251-failure set.
  • Upper shard: 2,484/2,907, exactly 2 failures removed and 0 added.
  • Focused declaration-merge filter: 20/20.
  • Checker: 3,189/3,192; only the 3 existing intentional scratch probes fail.
  • Diff: 1 file, +241/-6.

The canonical tsgo submodule remains _submodules/typescript-go, tracking https://github.com/microsoft/typescript-go.git on main.

14 days ago

tsgo parity: complete using declaration semantics

Pushed d48b26f71 (fix(ts-checker): complete using declaration semantics) directly to main, authored and committed as Chris with no coauthors.

This chunk ports three connected pieces of tsgo behavior:

  • preserves every declarator in comma-separated using / await using statements, including binding patterns, annotations, initializers, and resource flags
  • requires the global Disposable / AsyncDisposable interfaces when the selected libs do not provide explicit resource management, while accepting valid explicit declarations
  • models IteratorObject, AsyncIteratorObject, generators, Iterator subclasses, and array/map/set iterator-returning methods with their standard disposal protocols
  • keeps statement-level top-level-await diagnostics anchored once and treats disposal members as standard generator protocol members

Exact parity movement

  • previous: 5,233 / 5,907
  • current: 5,242 / 5,907 (88.74%)
  • remaining: 665
  • flipped: 9 fixtures
  • added failures: 0

Flipped fixtures:

  • usingDeclarations.5, .7, .9
  • awaitUsingDeclarations.5, .7, .9
  • usingDeclarationsWithIteratorObject
  • awaitUsingDeclarationsWithIteratorObject
  • awaitUsingDeclarationsWithAsyncIteratorObject

Validation

  • lower exact shard: 2,749 / 3,000, identical 251-failure set
  • upper exact shard: 2,493 / 2,907, 9 removed / 0 added
  • parser suite: pass
  • checker suite: 3,193 / 3,196, with only the same 3 intentional scratch probes
  • diff: 3 files, +265/-20
14 days ago

tsgo parity: finish using grammar and helper diagnostics

Pushed 2b3c8f8ad (fix(ts-parser): complete using grammar recovery) directly to main, authored and committed as Chris with no coauthors.

This follow-up closes the remaining using family:

  • parses ambiguous await using of loop heads as empty declaration lists while preserving the recovered for...of / for await...of node
  • applies normal await-using module/function context diagnostics inside loop heads
  • matches tsgo recovery for await using [a] = ... and using of of []
  • detects real resource declarations from parsed HIR for importHelpers
  • carries the selected resource-lowering target into multi-file/conformance compilation without changing the general emitter target
  • validates missing tslib after parsing, so helper diagnostics are tied to actual resource declarations

Exact parity movement

  • previous: 5,242 / 5,907
  • current: 5,249 / 5,907 (88.86%)
  • remaining: 658
  • flipped: 7 fixtures
  • added failures: 0

Flipped fixtures:

  • awaitUsingDeclarations.4
  • awaitUsingDeclarationsInForAwaitOf.3
  • awaitUsingDeclarationsInForOf.4
  • awaitUsingDeclarationsInForOf.5
  • awaitUsingDeclarationsWithImportHelpers
  • usingDeclarationsInForOf.2
  • usingDeclarationsWithImportHelpers

Validation

  • lower exact shard: 2,749 / 3,000, identical 251-failure set
  • upper exact shard: 2,500 / 2,907, 7 removed / 0 added
  • parser, driver, program, and conformance package suites: pass
  • standard conformance: 586 / 586
  • diff: 4 files, +259/-41
14 days ago

Pushed 80196e440 (fix(ts-checker): align import attribute diagnostics) to main.

This ports the shared tsgo behavior for import attributes/assertions and dynamic imports:

  • TS2857 now anchors on the actual with/assert clause for type-only imports and exports.
  • Malformed attribute clauses suppress grammar-only module diagnostics while recovered module resolution still emits TS2307.
  • Invalid dynamic-import arity is owned by parser TS1450, avoiding the extra checker TS2554.
  • Exact conformance preserves upstream error, warning, suggestion, and message categories and extracts all four from baselines.

Parity moved 5,249 -> 5,255 / 5,907 (88.86% -> 88.96%): 6 fixtures flipped, 0 regressions. Lower-shard failures moved 251 -> 245. Flipped: importAssertion1, importAssertion3, importAssertion5, importAttributes1, importAttributes3, and importAttributes5.

Validation:

  • ts_conformance: pass
  • exact lower shard: broad compiler regression audit, 4 immediate flips / 0 additions before the final category-ingestion correction
  • focused importA: confirms all six target fixtures pass
  • focused importCallExpressionGrammarError: confirms TS1450 message-category parity while retaining its unrelated semantic differences
  • ts_checker: 3,194 / 3,197, with only the same three intentional scratch: probes failing

Patch size: 2 files, +70/-24.

14 days ago

Pushed 5b5ffab61 (fix(ts-parser): recover await arrow parameters) to main.

This ports tsgo's malformed await => await parameter recovery into Home's arrow speculation path:

  • TS2524 anchors at the first await.
  • TS1109 anchors at the following =>.
  • The malformed arrow body is consumed for synchronization but detached from HIR, preventing a trailing semantic TS2304.

Parity moved 5,255 -> 5,258 / 5,907 (88.96% -> 89.01%): 3 fixtures flipped, 0 async-family regressions. Flipped: asyncFunctionDeclaration10_es5, asyncFunctionDeclaration10_es6, and asyncFunctionDeclaration10_es2017.

Validation:

  • ts_parser: 782/782
  • ts_conformance: pass
  • focused asyncFunctionDeclaration10: 3/3 exact
  • broader async survey: failures 18 -> 15, exactly the three targets removed and no additions

Patch size: 1 file, +33/-0.

14 days ago

Pushed 8ccbffbef (fix(ts-checker): type import attribute values) to main.

This ports tsgo's default ImportAttributes string index-signature checking into Home:

  • Classifies literal, template, regex, array, nested object, boolean, and string-producing attribute expressions.
  • Emits object-level TS2322 at the import attribute clause while preserving value-level TS2858 diagnostics.
  • Leaves custom literal ImportAttributes declarations on their specialized compatibility path.

Parity moved 5,258 -> 5,259 / 5,907 (89.01% -> 89.03%): importAttributes6 flipped exactly. Its four previously missing TS2322 diagnostics now match tsgo.

Validation:

  • ts_checker: 3,195/3,198, with only the same three intentional scratch: probes failing
  • ts_conformance: pass
  • focused importAttributes6: 1/1 exact

Patch size: 1 file, +119/-1.

14 days ago

Pushed 13b2b5c08 (fix(ts-parser): recover import type option commas) to main.

This ports tsgo's consecutive-comma recovery for typeof import() options into Home's import-type token scanner:

  • Outer option-list },, reports TS1005 with TS1007 matching-brace related information.
  • The malformed outer object preserves both declaration-recovery TS1128 anchors.
  • Nested attribute type: "json",, reports TS1478 at the second comma.

Parity moved 5,259 -> 5,260 / 5,907 (89.03% -> 89.05%): importAttributes10 flipped. The complete importAttributes family is now 11/11 exact.

Validation:

  • ts_parser: 784/784
  • ts_conformance: pass
  • focused importAttributes10: 1/1 exact
  • broader importAttributes family: 11/11 exact

Patch size: 1 file, +64/-0.

14 days ago

Pushed 79137111f (fix(ts-checker): preserve CommonJS module identities) to main.

This ports tsgo's CommonJS namespace display identities through late-bound export and require diagnostics:

  • Local exports[...] diagnostics derive their target from the virtual section filename.
  • module.exports[...] preserves TypeScript's .js extension distinction.
  • Required CommonJS object types retain their resolved typeof import(...) namespace name instead of printing an anonymous object shape.

Parity moved 5,260 -> 5,263 / 5,907 (89.05% -> 89.10%): 3 fixtures flipped. The lateBoundAssignmentDeclarationSupport family is now 7/7 exact.

Validation:

  • ts_checker: 3,195/3,198, with only the same three intentional scratch: probes failing
  • ts_conformance: pass
  • focused late-bound family: 7/7 exact

Patch size: 1 file, +18/-2.

14 days ago

Pushed 967eeda7d (fix(ts-checker): bind computed-name this to owning class).

This ports tsgo's computed-name this semantics: TS2465 is retained, but this still resolves to the owning inner class's static or instance side so independent TS2339 and TS1166 diagnostics are preserved. Static-side missing-property prose now keeps the typeof Inner identity.

Parity movement: 5263/5907 -> 5265/5907 exact (89.13%), leaving 642. Flipped typeOfThisInStaticMembers12 and typeOfThisInStaticMembers13.

Validation: focused typeOfThisInStaticMembers1* survey passes both targets; only the pre-existing 10/11 anchor mismatches remain. Checker suite is 3196/3199, with only the same three intentional scratch probes failing. Change size: 1 file, +65/-11.

14 days ago

Pushed 1f79d3959 (fix(ts-checker): preserve class field this boundaries).

This ports three related tsgo ownership-boundary behaviors: class expressions held by class fields are recognized as expressions, missing this members retain (Anonymous class) identity, and legacy decorated static-field TS2816 checks now run before narrowed this lookup. Arrow functions inherit the static field context; ordinary function and nested class expressions rebind it.

Parity movement: 5265/5907 -> 5268/5907 exact (89.18%), leaving 639. Flipped typeOfThisInStaticMembers8, typeOfThisInStaticMembers10, and typeOfThisInStaticMembers11. The full family is now 12/13; only the separate super-boundary fixture 9 remains.

Validation: checker 3198/3201, with only the same three intentional scratch probes failing; focused exact family 12/13. Change size: 1 file, +50/-14.

14 days ago

Pushed 97a323a5a (fix(ts-checker): isolate nested class super bindings).

This prevents an outer class's narrowed super binding from leaking into a nested class with no base, applies the rule to property and element access, and stops ES5 base-data-property resolution after TS2340 so it cannot cascade into TS2339. Repeated visits to the same TS2340 access are deduplicated.

Parity movement: 5268/5907 -> 5269/5907 exact (89.20%), leaving 638. Flipped typeOfThisInStaticMembers9, completing the entire family at 13/13 exact.

Validation: checker 3199/3202, with only the same three intentional scratch probes failing; focused exact family 13/13. Change size: 1 file, +39/-2.

Note: the original local commit was rebased over the concurrent 72316cbca interpreter fix before push; final pushed hash is 97a323a5a.

14 days ago

Pushed 22920d137 (fix(ts-checker): render generator annotation mismatches).

This replaces placeholder generator return diagnostics with synthesized Generator/AsyncGenerator type text, reports required extra interface members with TS2741, and resolves generator yield types recursively through interface heritage (for example WeirdIter extends IterableIterator<number>).

Parity movement: 5269/5907 -> 5271/5907 exact (89.23%), leaving 636. Flipped generatorTypeCheck6 and generatorTypeCheck7; the focused generator family improved from 57/64 to 58/64 with no new failures.

Validation: checker 3199/3202, with only the same three intentional scratch probes failing; focused exact generator family 58/64. Change size: 1 file, +73/-15.

14 days ago

Generator protocol parity: 6 fixtures flipped

Pushed 425c988c9 (fix(ts-checker): preserve inferred generator protocols).

This ports tsgo behavior for contextual generator return inference, Yield/Return/Next protocol slots, delegated iterable yields, composite Iterator + Iterable annotations, generator callback compatibility, and contextual typing for returned generator functions. It also prevents an unrelated strict-null fallback from reporting an impossible T-to-T generic argument mismatch.

Parity movement:

  • Flipped generatorTypeCheck8, generatorTypeCheck25, generatorTypeCheck28, generatorTypeCheck31, generatorTypeCheck62, and generatorTypeCheck63
  • Focused exact generator family: 58/64 -> 64/64
  • Aggregate exact accounting from the known baseline plus these verified flips: 5,271 -> 5,277 / 5,907 (89.33%)
  • Remaining exact mismatches: 636 -> 630

Validation:

  • Exact generatorTypeCheck family: 64/64 pass
  • ts_checker: 3,202/3,205 pass; the only failures are the same three intentional scratch probes (attrRes12, tuple ICA, attrRes15)
  • Added three focused checker regressions for conflicting composite protocols, inferred empty-yield/next slots, and generic returned-generator callback diagnostics
  • Scope: packages/ts_checker/src/check.zig, +336/-51
14 days ago

TypeScript parity progress: logical short-circuit types

Pushed 1ed755aef (fix(ts-checker): model logical short-circuit types) directly to main.

Ported behavior

  • Models tsgo && result types as the definitely-falsy portion of the left operand plus the reachable right operand.
  • Models tsgo || result types as the truthy portion of the left operand plus the reachable right operand.
  • Preserves concrete short-circuit values such as false, true, "", 0, and 0n.
  • Checks both the short-circuit path and the right-hand path during contextual assignment.
  • Keeps positive typeof narrowing active when definite-assignment analysis independently emits TS2454, while negative branches retain the original pending type.
  • Accepts structurally covariant recursive interface members such as prototype: D1 overriding prototype: C1.
  • Prevents diagnostic literal widening from collapsing unions such as false | string to string.

Exact parity movement

Focused typeGuard survey: 26/60 -> 31/60.

New exact passes:

  • typeGuardOfFormTypeOfPrimitiveSubtype
  • typeGuardsInClassAccessors
  • typeGuardsInClassMethods
  • typeGuardsInProperties
  • typeGuardsObjectMethods

No focused fixture regressed. Aggregate exact parity advances 5277 -> 5282 / 5907 (89.42%), reducing known failures 630 -> 625.

Verification

  • ts_checker: 3205/3208; only the three intentional scratch probes fail.
  • exact focused typeGuard: 31/60, 29 remaining.
  • change size: packages/ts_checker/src/check.zig +210/-19.
14 days ago

TypeScript parity progress: operand-order-neutral typeof guards

Pushed 80ca5d754 (fix(ts-checker): normalize typeof guard operands) directly to main.

Ported behavior

  • Routes typeof x === "kind" and "kind" === typeof x through the same flow-narrowing implementation.
  • Preserves positive/negative identifier and property narrowing, pending definite-assignment behavior, function/object targets, and null filtering for both operand orders.
  • Retains the known never receiver in the dedicated impossible-right-operand TS2339 path instead of formatting an incomplete does not exist on type. message.

Exact parity movement

Focused typeGuard survey: 31/60 -> 33/60.

New exact passes:

  • typeGuardOfFormTypeOfIsOrderIndependent
  • typeGuardsInRightOperandOfOrOrOperator

No focused fixture regressed. Aggregate exact parity advances 5282 -> 5284 / 5907 (89.45%), reducing known failures 625 -> 623.

Verification

  • ts_checker: 3206/3209; only the three intentional scratch probes fail.
  • exact focused typeGuard: 33/60, 27 remaining.
  • change size: packages/ts_checker/src/check.zig +69/-52.
14 days ago

TypeScript parity progress: inferred var merges and invalid typeof tags

Pushed 79df4c7b7 (fix(ts-checker): retain inferred var merge types) directly to main.

Ported behavior

  • Records ordinary inferred var declarations in the hoist-scope compatibility map, allowing sibling control-flow branches to compare their narrowed initializer types.
  • Emits TS2403 for incompatible branch redeclarations while retaining the existing bidirectional compatibility relation for valid repeated declarations.
  • Models the fixed runtime result domain of typeof for TS2367, including the exact valid-tag union in diagnostics.
  • Matches tsgo compatibility for the invalid capitalized "Object" tag: emits TS2367 but still applies object-like flow narrowing.
  • Preserves nominal class constituents when a narrowed class is an exact member of its declared union.

Exact parity movement

Focused typeGuard survey: 33/60 -> 35/60.

New exact passes:

  • typeGuardOfFormTypeOfEqualEqualHasNoEffect
  • typeGuardOfFormTypeOfNotEqualHasNoEffect

No focused fixture regressed. Aggregate exact parity advances 5284 -> 5286 / 5907 (89.49%), reducing known failures 623 -> 621.

Verification

  • ts_checker: 3207/3210; only the three intentional scratch probes fail.
  • exact focused typeGuard: 35/60, 25 remaining.
  • change size: packages/ts_checker/src/check.zig +65/-16.
14 days ago

Pushed bdf66bb94 (fix(ts-checker): check namespace control flow) directly to main as Chris, with no coauthors.

This parity chunk ports two related definite-assignment/control-flow behaviors from tsgo:

  • Namespace bodies now send executable control-flow statements (if, loops, switch, try, and blocks) through the ordinary statement checker. This exposes the same narrowing and branch-assignment diagnostics as top-level/function code instead of relying only on the separate TS2454 scan.
  • Removed the stale suppression that hid TS2454 for namespace-local variables used in control-flow conditions.
  • Directly invoked ordinary function expressions now carry the caller's pending definite-assignment state. Home HIR represents these expressions as fn_decl, so the IIFE walker now recognizes that kind alongside fn_expr and arrows.

Parity movement:

  • typeGuardsInFunction: exact pass
  • typeGuardsInModule: exact pass
  • Focused typeGuard family: 35/60 -> 37/60, no regressions
  • Aggregate exact corpus: 5286/5907 -> 5288/5907 (89.52%)
  • Remaining exact mismatches: 621 -> 619

Verification:

  • typeGuard exact family: 37 passed / 23 failed / 60 total
  • ts_checker: 3208/3211; only the three intentional scratch probes fail
  • Change size: packages/ts_checker/src/check.zig +38/-35

The implementation is shared checker behavior rather than fixture-specific matching: namespace control flow now enters the normal semantic pipeline, and IIFE definite-assignment propagation follows the actual HIR representation.

Sign in to comment on this issue.