ReviewOS

home-lang/home

TypeScript checker parity: eliminate the remaining 30 failures

#69
Closed chris opened this 22 days ago · 717 comments
22 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.
22 days ago

Pushed b0e5f490d (fix(ts-checker): preserve broad property inequality flow).

Parity impact:

  • Flips parserRealSource14 to exact tsgo parity.
  • Projected exact corpus: 5,725/5,907 passing, 182 remaining.
  • Reconciles the single extra TS2339 by preventing broad number properties (such as array length) from exhausting a single object as if they were unit discriminants.
  • Adds 1 focused regression; the real exact fixture and discriminant-focused checker cluster pass.

Change size: 16 insertions across 1 checker file (4 implementation lines plus the regression).

22 days ago

Pushed f77805a (fix(ts-checker): align declaration JSDoc recovery).

Parity impact:

  • Flips jsDeclarationsMissingTypeParameters and paramTagNestedWithoutTopLevelObject3 to exact tsgo parity.
  • Projected exact corpus: 5,727/5,907 passing, 180 remaining.
  • Adds declaration-only TS1099 validation for empty Closure type arguments without changing ordinary check-JS acceptance.
  • Stops malformed deep @param paths from fabricating undocumented intermediate object members.

Change size: 45 insertions and 1 deletion in 1 checker file, including 2 regressions. All checker tests and both exact fixtures pass.

22 days ago

Pushed 8e4730810 (fix(ts-checker): enforce JSDoc typedef ownership).

Parity impact:

  • Flips checkJsdocTypedefOnlySourceFile and jsdocTemplateClass to exact tsgo parity.
  • Projected exact corpus: 5,729/5,907 passing, 178 remaining.
  • Typed nameless typedefs now emit both TS1003 recovery anchors.
  • Typedefs declared inside class bodies no longer capture the enclosing class @template parameters; ordinary member annotations still do.

Change size: 112 insertions in 1 checker file, with 1 new and 1 strengthened regression. The typedef-focused checker cluster and both exact fixtures pass.

22 days ago

Pushed a7f19bf60 (fix(ts-checker): keep require members value-only).

Parity impact:

  • Flips jsdocTypeReferenceToImport to exact tsgo parity.
  • Projected exact corpus: 5,730/5,907 passing, 177 remaining.
  • Direct and optional require(...).Member aliases now emit TS2749 when referenced as JSDoc types, while remaining valid constructor/value aliases.
  • Bare-module require aliases retain their existing instance-type behavior.

Change size: 54 insertions in 1 checker file and 1 strengthened regression. The focused checker test and all 3 exact fixtures matched by the family filter pass.

22 days ago

Pushed 4c529e197 (fix(ts-checker): honor JSDoc assertion annotations).

  • Flips assertionsAndNonReturningFunctions to exact tsgo parity.
  • Treats variable-level JSDoc @type as an explicit assertion-call annotation while preserving TS2775 for inferred assertion aliases.
  • Changes 2 annotation checks and adds 1 focused regression (16 insertions, 2 replacements).
  • Focused checker regression and exact conformance fixture pass.

Projected exact parity: 5731/5907, with 176 remaining pending the next full census.

22 days ago

Pushed 66bfa95db (fix(ts-checker): align JSDoc collection semantics).

  • Flips 3 exact fixtures: checkJsdocSatisfiesTag1, templateInsideCallback, and enumTag.
  • Preserves tuple-array relations for JSDoc @satisfies.
  • Models built-in Array.push as (...items: T[]), accepting array spreads while retaining fixed-call TS2556 checks.
  • Keeps tsgo-unsupported JSDoc @enum value objects open across enclosing lexical scopes while preserving value-as-type diagnostics.
  • Changes 3 generalized paths and adds 3 focused regressions: 124 insertions, 1 replacement across 2 checker files.
  • Focused cluster, exact satisfies/spread/enum families, and the full checker suite pass.

Projected exact parity: 5734/5907, with 173 remaining pending the next full census.

22 days ago

Pushed 980ee2208 (fix(ts-checker): preserve namespace merge callability).

  • Resolves local named-export namespaces as concrete typeof value objects.
  • Gives same-section namespace declarations ownership over conflicting named imports.
  • Flips 2 exact tsgo fixtures: typeOnlyMerge3 and valuesMergingAcrossModules.
  • Added one dual-shape checker regression; focused exact survey is 2/2 and the full ts_checker suite passes.

Projected parity: 5,736/5,907 passing, 171 remaining.

22 days ago

Pushed 13bdc539c (fix(ts-checker): merge intersection accessibility).

  • Unified inherited and structural intersection visibility merging.
  • Preserves private dominance, lets public override protected, and keeps protected-only intersections protected.
  • Flips exact fixture mixinAccessModifiers; focused regression and full ts_checker suite pass.

A grouped exact audit also confirmed 7 older census failures are already green from prior semantic work: objectSpreadRepeatedNullCheckPerf, importAttributes1, importAssertion1, thisTypeOfConstructorFunctions, typeFromPropertyAssignment22, classCanExtendConstructorFunction, and typeFromJSConstructor. A separate exact audit confirmed thisTypeInAccessors and thisTypeInAccessorsNegative are also green.

Projected parity: 5,746/5,907 passing, 161 remaining.

22 days ago

Pushed 0e386727e (fix(ts-checker): specialize declared member contracts) directly to main as Chris Breuer, with no coauthors.

This batch ports three checker contracts:

  • walks conditional mapped templates to find and substitute each concrete mapped key, fixing accessorsOverrideProperty8;
  • recovers explicit class annotations after any-valued initializers (including forward sibling classes), fixing protectedInstanceMemberAccessibility;
  • separates the required Intl.Locale constructor signature from the structurally interned optional Intl.Segmenter signature and makes DisplayNames.supportedLocalesOf arguments optional, fixing es2020IntlAPIs.

Verification:

  • focused exact corpus survey: 3/3 passed
  • complete ts_checker suite: passed
  • diff: 76 insertions, 1 deletion, with 3 focused regressions

Projected exact parity: 5,749/5,907 passing, 158 remaining.

22 days ago

Prototype receiver strictness parity

Pushed 56bb5bb98 (fix(ts-checker): honor prototype receiver strictness).

  • Added noImplicitThis to the checker strictness contract and threaded it through conformance directives and tsconfig-driven compilation.
  • Resolved constructor declarations through enclosing lexical blocks, including constructors nested inside callbacks/IIFEs.
  • Preserved constructor-member inference for strict prototype object methods while correctly leaving loose TypeScript receivers as any.
  • Added a strict TypeScript regression for nested constructor/prototype field lookup.
  • Changed 40 lines and removed 4 across 3 TypeScript packages.

Exact parity impact:

  • fixSignatureCaching: failing -> passing
  • Projected exact corpus: 5,754 / 5,907 passing (97.41%)
  • Remaining: 153

Verification:

  • Focused checker regression: pass
  • Exact conformance: fixSignatureCaching: pass
  • Exact receiver audit: fixSignatureCaching, looseThisTypeInFunctions, typeofThisWithImplicitThis, thisInObjectLiterals: 4/4 pass
  • Full ts_checker suite: pass
  • Full ts_driver suite: pass
22 days ago

Annotated receiver flow parity

Pushed eb4f974c2 (fix(ts-checker): retain annotated receiver contracts).

  • Recover explicit non-any annotations when assignment flow temporarily widens a member receiver to any.
  • Keep later property checks anchored to the declared static type while retaining forward-class recovery.
  • Added a focused regression covering a nullable Symbol local reassigned from any and then accessed through guarded member chains.
  • Changed 28 lines and removed 2 in one checker file.

Exact parity impact:

  • Restored 5 missing TS2339 rows in parserRealSource8.
  • parserRealSource8: failing -> passing.
  • Projected exact corpus: 5,755 / 5,907 passing (97.43%).
  • Remaining: 152.

Verification:

  • Focused checker regression: pass.
  • Exact parserRealSource8: pass.
  • Pre/post comparison of everyTypeWithAnnotationAndInvalidInitializer and assignmentTypeNarrowing: identical existing mismatches, no new rows.
  • Full ts_checker suite: pass.
22 days ago

CommonJS callable re-export parity

Pushed d62891458 (fix(ts-checker): preserve re-exported callable contracts) to main as Chris Breuer with no coauthor.

This ports the missing cross-file callable behavior for checked JavaScript:

  • preregisters function signatures exported from later virtual-file sections;
  • resolves require() binding members such as m.default before typing a whole module.exports assignment;
  • gives the exact whole-export contract precedence over the open CommonJS expando map;
  • rejects a later module.exports.memberName = ... write when the whole export is the closed callable () => void.

Quantified change:

  • 1 file changed;
  • 66 insertions, 2 deletions;
  • 1 focused checker regression added;
  • 1 exact conformance fixture flipped: jsDeclarationsCrossfileMerge;
  • 1 missing TS2339 restored: Property 'memberName' does not exist on type '() => void'.

Verification:

  • exact CommonJS batch: 3/3 passed (jsDeclarationsCrossfileMerge, commonJSAliasedExport, moduleExportAlias4);
  • full ts_checker suite passed;
  • 16-fixture JSDoc/declaration audit produced exactly the intended single flip and retained the other 15 prior mismatch shapes;
  • git diff --check passed.

Projected exact parity is now 5,756 / 5,907, with 151 fixtures remaining.

22 days ago

Pushed three small tsgo parity ports to main as Chris (no coauthors):

  • 28680bc66 fix(ts-driver): ignore wildcard type package sentinel
    • Treats @types: * as automatic package discovery rather than a literal missing @types/* package.
    • 16 insertions, 1 deletion.
    • Flips jsDeclarationsTypeReferences3 to exact parity.
  • 7b660d468 fix(ts-checker): preserve JSDoc enum import semantics
    • Tracks the JSDoc tag line that owns a bare import type so @enum keeps type-alias semantics while typedef and parameter tags still report TS1340.
    • 32 insertions, 1 deletion.
    • Flips jsDeclarationsParameterTagReusesInputNodeInEmit1 to exact parity.
  • db88155e1 fix(ts-checker): preserve CommonJS entity aliases
    • Mirrors tsgo's direct entity-name CommonJS alias classification, including Home's lowered undefined representation, while preserving TS7008 for nested assignments and void 0 placeholders.
    • 8 insertions, 4 deletions.
    • Flips jsdocTypeFromChainedAssignment3 to exact parity.

Verification:

  • Exact conformance filter for all three fixtures: 3/3 passing.
  • Full ts_driver suite: passing.
  • Full ts_checker suite: passing.
  • git diff --check: clean for the touched files.

Projected exact census: 5,759/5,907 passing, 148 remaining. This batch adds three exact fixture flips over the last full census without changing expected diagnostics or baselines.

22 days ago

Pushed the next verified tsgo parity batch to main as Chris (no coauthors):

  • a5df36737 fix(ts-checker): align JSDoc function arity diagnostics
    • Uses the JSDoc-specific TS8030 message for every function @type arity mismatch.
    • Includes object-literal methods and suppresses only their redundant contextual TS2322 cascade after all checker passes finish.
    • 31 insertions, 8 deletions.
    • Flips checkJsdocTypeTag6 and typeTagCircularReferenceOnConstructorFunction to exact parity.
  • ba50457fc fix(ts-checker): report typed class syntax in JavaScript
    • Applies the existing JS-only TS8010/TS8017 policy to class property annotations and class index signatures.
    • 43 insertions.
    • Restores all 18 missing diagnostics and flips jsDeclarationsClassesErr to exact parity.

Verification:

  • Exact conformance filter: 3/3 passing.
  • Full ts_checker suite: passing.
  • git diff --check: clean for the touched file.

Projected exact census: 5,762/5,907 passing, 145 remaining. Together with the prior batch in this run, this session has flipped 6 fixtures without modifying expected baselines.

22 days ago

Pushed d9362e8e5 (fix(ts-checker): retain chained CommonJS exports) to main as Chris.

This ports tsgo's right-associative CommonJS export binding into Home's virtual module namespace synthesis. Nested assignment targets are now walked in source order, and every exports.* / module.exports.* alias retains the assigned callable type.

  • Restored 2 previously dropped inner callable aliases (g and i).
  • Flipped jsdocTypeFromChainedAssignment2 to exact parity.
  • Rechecked neighboring jsdocTypeFromChainedAssignment3 to guard the prior undefined-alias behavior.
  • Added a focused checker regression covering both CommonJS target forms: 4 argument errors, 0 missing-property errors.
  • Projected exact parity: 5,763 / 5,907, with 144 remaining.

Focused verification passed. I am batching the next parity ports before the consolidated checker run, per the current test strategy.

22 days ago

Pushed three small parity commits to main as Chris:

  • abee884c1 (fix(ts-checker): report unused module functions)
    • Ports source-file unused function tracking for external modules.
    • Preserves virtual-file isolation and exempts direct/named exports and actual reads.
    • Restores 3 TS6133 rows and flips importTag24.
  • d13f92bd1 (fix(ts-parser): recover wrapped JSDoc params)
    • Ports multiline @param type/name continuation across starred lines.
    • Handles 3 wrapping forms, removes 2 synthetic TS1003 rows, and restores the correct TS7006 row.
    • Flips paramTagWrapping.
  • f365ed983 (fix(ts-checker): preserve JSDoc return ownership)
    • Distinguishes direct/inline callback contracts from variable-owned contextual contracts.
    • Carries resolved return contracts into body checking and finds JSDoc before async function declarations.
    • Corrects 4 diagnostic rows and flips errorOnFunctionReturnType.

Verification:

  • Full TypeScript checker suite: 3,923 / 3,923 passed.
  • TypeScript parser suite: passed.
  • Exact focused conformance: 4 / 4 passed (importTag24, paramTagWrapping, errorOnFunctionReturnType, plus the jsdocTypeFromChainedAssignment3 regression guard).

Projected exact parity is now 5,766 / 5,907, with 141 remaining.

22 days ago

Pushed c25257217 (fix(ts-checker): preserve CommonJS whole-export flow).

  • Ported source-ordered module.exports value flow into nested CommonJS function assignments.
  • Preserved tsgo contextual this, TS2339, and TS7009 behavior without cascading through rejected .prototype members.
  • Rendered anonymous class whole exports as typeof exports.
  • Added 2 focused checker regressions (93 insertions, 2 deletions).
  • Exact tsgo fixtures now pass: jsDeclarationsExportAssignedConstructorFunctionWithSub and jsDeclarationsExportAssignedClassExpressionAnonymousWithSub (8 expected diagnostics total).

Projected exact parity: 5768/5907 (97.65%), 139 fixtures remaining. Focused checker regressions and the 2-fixture exact run are green.

22 days ago

Pushed 04c1a85a5 (fix(ts-checker): model named CommonJS export flow).

  • Contextualized member-assigned constructor functions with the current CommonJS module namespace.
  • Recognized qualified constructor prototypes.
  • Ported forward CommonJS export reads to TS2565 definite-assignment diagnostics.
  • Added 2 focused checker regressions (94 insertions, 6 deletions).
  • Exact tsgo fixtures now pass: jsDeclarationsExportAssignedConstructorFunction and jsDeclarationsFunctionsCjs (5 expected diagnostics total); the neighboring WithSub fixture remains exact.

Projected exact parity: 5770/5907 (97.68%), 137 fixtures remaining.

22 days ago

Pushed 8db2aafbf (fix(ts-checker): preserve React function expandos).

This ports React function-component expando behavior for checked JSX: React.SFC/React.FunctionComponent JSDoc types retain callable component members, local inferred functions accept propTypes/defaultProps, and imported React JSDoc qualification no longer emits a false namespace error.

Exact impact: jsDeclarationsReactComponents now passes, eliminating 5 unexpected diagnostics. Projected exact parity is 5,771/5,907 (97.70%), with 136 fixtures remaining. Focused expando checker tests and the canonical fixture both pass.

22 days ago

Pushed 32e7bbf15 (fix(ts-checker): resolve JSDoc namespace heritage).

This ports two related JSDoc resolution paths: named CommonJS class exports now become instance types in import("./mod").C, and textual @implements tags resolve ambient namespace interfaces, including generic members such as N.AT<string>.

Direct exact flips: jsdocImportTypeReferenceToClassAlias and jsdocImplements_namespacedInterface. The clustered rerun also confirmed 3 transitive passes from earlier work (jsDeclarationsParameterTagReusesInputNodeInEmit1, jsdocTypeReferenceToImport, importTag24). Corrected projected parity is 5,776/5,907 (97.78%), with 131 fixtures remaining. Both focused checker regressions and both canonical fixtures pass.

22 days ago

Pushed a3c4c7fe7 (fix(ts-checker): bind generic JSDoc import aliases).

This instantiates generic JSDoc import() members through exported declarations and keeps @template binders visible across parsed and byte-position diagnostic paths.

Exact impact: jsDeclarationsClassImplementsGenericsSerialization now passes in both target variants, removing 2 unexpected diagnostics. The clustered rerun also confirmed jsdocTemplateClass as a transitive pass. Projected parity is 5,778/5,907 (97.82%), with 129 fixtures remaining. Focused checker coverage and the canonical fixture pass.

22 days ago

Pushed ae4c63538 (fix(ts-checker): isolate JSDoc callback templates).

Callback/typedef template binders now remain available while their attached JSDoc is checked without incorrectly becoming generic parameters of the following class.

Exact impact: callbackTag2 now passes, removing 2 unexpected TS2304 diagnostics and matching the remaining TS2339 display as SharedClass rather than SharedClass<S>. Projected parity is 5,779/5,907 (97.83%), with 128 fixtures remaining. Focused checker coverage and the canonical fixture pass.

22 days ago

Pushed 7bf707dfb (fix(ts-checker): elaborate JSDoc typedef constraints).

This ports constrained comma-template metadata and structural missing-member elaboration for generic JSDoc typedefs across JS/TS virtual files. typedefMultipleTypeParameters now matches tsgo exactly: both invalid { a: number } arguments report TS2741, while the insufficient arity remains TS2314.

Validation:

  • focused checker regression: pass
  • exact canonical fixture: 1/1 pass
  • projected exact parity: 5780/5907 (97.85%), 127 remaining
22 days ago

Pushed 83fac2f2e (fix(ts-checker): preserve JSDoc callable metadata).

  • Flipped 2 exact tsgo fixtures: jsdocThisType and callbackTagVariadicType.
  • Preserved contextual JSDoc this receivers while rejecting malformed Closure receiver syntax.
  • Modeled variadic @callback parameters as rest signatures with exact TS2370/TS2345 diagnostics.
  • Prevented semicolon-free adjacent declarations from inheriting the preceding JSDoc @type.
  • Validation: 71/71 focused JSDoc checker tests; 2/2 exact upstream baselines.
  • Projected parity: 5782/5907 (97.88%), up 2 fixtures, 125 remaining.
22 days ago

Pushed 5c0fc5136 (fix(ts-checker): preserve defineProperty object shapes) to main as Chris, with no coauthor trailer.

This chunk ports checked-JS Object.defineProperty shape propagation across local object literals, readonly/getter/setter descriptors, whole-object CommonJS exports, require assignment writes, root ./ index resolution, and inline JSDoc readonly object members. It adds 3 focused regressions in a 277-insertion/5-deletion checker change.

Exact tsgo flips in this batch:

  • checkExportsObjectAssignProperty
  • checkJsdocSatisfiesTag1
  • checkObjectDefineProperty

Validation:

  • focused whole-CommonJS-export regression: pass
  • all checker tests matching defineProperty: pass
  • exact checkObjectDefineProperty: 1/1 pass
  • broad checker suite: 3,934/3,937 pass, with 2 unrelated assertion failures and 1 pre-existing recursive static-property crash retained for follow-up

Projected exact parity: 5,785/5,907 (97.93%), 122 remaining.

22 days ago

Pushed b05dae381 (fix(ts-checker): restore checker regression parity) to main as Chris, with no coauthors.

This follow-up repairs all three regressions exposed by the consolidated checker run after the defineProperty port:

  • prevents preregistration from recursively evaluating unresolved computed class keys;
  • recognizes metadata-backed fixed tuples as valid rest-array types and suppresses redundant TS2345 on too-few calls;
  • distinguishes direct module.exports.C = C type aliases from value-only module.exports = { C } properties in import types.

Measured change: 35 insertions, 8 deletions in one checker file.

Validation:

  • recursive static Function-property regression: pass
  • inferred fixed-tuple rest arity regression: pass
  • whole-object CommonJS import-type TS2694 regression: pass
  • direct named CommonJS JSDoc class alias guard: pass
  • full ts_checker: 3,937/3,937 passing, zero failures, zero crashes

Exact corpus projection remains 5,785/5,907 (97.93%), with 122 remaining.

22 days ago

Pushed e148acdb7 (fix(ts-checker): preserve reachable block flow).

  • Exact parity flip: controlFlowTypeofObject
  • Removed 2 unexpected TS2345 diagnostics while retaining the 1 canonical TS2345
  • Added lexical-block flow propagation for outer bindings/member paths with shadow filtering
  • Added constant if/else branch flow and unary boolean folding
  • Checker regressions: 3,938/3,938 passing
  • Exact fixture verification: 1/1 passing

Projected full-corpus parity: 5,786/5,907 (97.95%), 121 remaining.

22 days ago

Pushed f326a96a8 (fix(ts-parser): recover assertion predicate syntax).

  • Full fixture flips: 0 (downstream checker gaps remain)
  • Removed 2 hard parser aborts from dependentDestructuredVariables and assertionTypePredicates1
  • Restored all 7 canonical TS1228 diagnostics in assertionTypePredicates1
  • Added support for contextual-keyword tuple labels, asserts this, predicate parameter recovery, and constructor predicate diagnostics
  • Complete parser suite passing
  • Checker regressions: 3,938/3,938 passing

Projected exact corpus remains 5,786/5,907 (97.95%), 121 remaining.

22 days ago

Pushed 79ef178a2 (fix(ts-checker): carry for-loop flow facts).

  • Exact parity flip: controlFlowForStatement
  • Removed 2 unexpected diagnostics; retained all 6 canonical diagnostics
  • Added initializer -> condition, body -> update, and false-condition -> loop-exit flow
  • Guarded-break proof preserves definite assignment without accepting unguarded exits
  • Checker regressions: 3,940/3,940 passing
  • Exact fixture verification: 1/1 passing

Projected full-corpus parity: 5,787/5,907 (97.97%), 120 remaining.

22 days ago

TS parity progress: generic React function component props

Pushed e15a00c39 (fix(ts-checker): preserve generic React function props).

This ports the missing synthetic React callable behavior for React.StatelessComponent<P> and preserves generic P plus the library's P & { children?: ReactNode } call-parameter shape. That lets returned arrows receive their contextual props type and feeds the constrained generic shape through JSX spread checking.

Exact conformance impact:

  • Flipped tsxGenericAttributesType1 to exact parity (1/1).
  • Removed 3 unexpected TS7006 diagnostics.
  • Restored the canonical TS2783 and its TS2785 related information.
  • Projected cumulative exact parity from the latest full census: 5,788 / 5,907 (97.99%), 119 remaining.

Verification:

  • Focused checker regression: pass.
  • Exact canonical fixture: 1/1 pass.
  • Full checker suite: 3,941 / 3,941 pass.
  • Scoped diff check: clean.
22 days ago

Pushed 8cee87264 (fix(ts-checker): narrow generic constraint flow).

Parity movement:

  • Flipped controlFlowGenericTypes to exact tsgo parity: 1 fixture.
  • Aligned 15 diagnostic deltas: removed 9 unexpected diagnostics and restored 6 canonical diagnostics.
  • Projected exact parity: 5,789 / 5,907 (98.00%), with 118 fixtures remaining.

Logical ports in this chunk:

  • Predicate positive/negative narrowing through generic union constraints.
  • Negative-predicate generic inference provenance (Box<T> vs Box<unknown>).
  • Generic property-presence and discriminant narrowing.
  • Nullish generic element access and truthiness flow.
  • Symbolic keyof relations for narrowed generic indexed reads/writes.

Validation:

  • Exact controlFlowGenericTypes: 1/1 passed.
  • Focused generic-flow regression: passed.
  • Existing optional string-key truthiness regression: passed.
  • Full checker suite: 3,942/3,942 passed.

Commit is authored as Chris Breuer with no coauthor trailers.

22 days ago

Pushed 372ad49da (fix(ts-checker): port assertion and correlated flow) to main as Chris Breuer.

Parity movement:

  • Ported 659 lines and removed 35 obsolete lines across assertion provenance, optional-chain evaluation flow, and dependent tuple correlation.
  • Flipped assertionTypePredicates1 from exact failure to 1/1 exact pass.
  • Projected exact conformance parity: 5,790/5,907 (98.02%), leaving 117 fixtures.
  • Full checker suite: 3,945/3,945 pass.
  • Added focused coverage for same-name unannotated assertion shadows, assertion class-field context, super.assert(false) reachability, optional-chain side-effect flow, and contextual rest-tuple correlation.

The same tranche also restored canonical TS2454/TS18048 behavior in controlFlowOptionalChain (including the prior never collapses around === undefined) and canonical TS7022 in dependentDestructuredVariables. Those two fixtures remain active because their remaining mismatches cluster around typeof optional-chain evaluation and additional method/generic/unequal-arity dependent tuple forms.

22 days ago

Pushed f55927711 (fix(ts-checker): complete optional-chain control flow) as Chris Breuer with no co-authors.

This ports receiver-evaluation facts through typeof guards, assertion predicates, strict null comparisons, and optional discriminated switch clauses. The chunk adds 66 lines and adjusts 4 lines, with focused regression coverage for condition, assertion, instanceof, strict-null, switch-default, and discriminated-union behavior.

Verification:

  • focused optional-chain checker regression: pass
  • full checker suite: 3,945/3,945 pass
  • exact controlFlowOptionalChain* corpus slice: 3/3 pass

Parity impact: flips controlFlowOptionalChain from failing to exact, moving projected full exact parity from 5,790/5,907 (98.02%) to 5,791/5,907 (98.04%), with 116 fixtures remaining.

22 days ago

Pushed bf4508599 (fix(ts-checker): complete dependent destructuring flow).

Parity movement:

  • Flipped 3 canonical typescript-go fixtures: dependentDestructuredVariablesFromNestedPatterns, dependentDestructuredVariables, and dependentDestructuredVariablesWithExport.
  • Exact parity: 5791 -> 5794 / 5907 (98.09%).
  • Remaining exact mismatches: 116 -> 113.

Implementation covers owner-scoped tuple/object destructuring correlation, projection constraints, unequal tuple arity, constrained generic rest callbacks, nullish guards, and reassignment invalidation.

Verification:

  • Canonical focused corpus: 3/3 passed.
  • Checker suite: 3947/3947 passed.
  • zig fmt --check and git diff --check passed.
22 days ago

Baseline correction and update:

  • A fresh complete exact survey of pushed bf4508599 against the prior tsgo pin measured 5755/5907, with 152 mismatches. The previously posted 5794/5907 number was a projection from stale cumulative checkpoints, not a valid full census; please treat it as superseded. The three fixtures attributed to bf4508599 are still confirmed 3/3 exact.
  • Pushed d0587c0d9 (chore(ts-parity): advance tsgo main baseline) to move the canonical gitlink from 24fabe95 to 89d5d5b2 (66 upstream main commits) with nested TypeScript at 5848bc51.
  • .gitmodules already points to https://github.com/microsoft/typescript-go.git, tracks main, and uses shallow cloning.
  • The updated baseline still contains 5907 conformance fixtures; the dependent-destructuring guard remains 3/3 exact.

I am re-censusing the compact failure identities against 89d5d5b2 before reporting a new aggregate, so no projected aggregate will be used as measured parity going forward.

22 days ago

Measured tsgo-main baseline checkpoint after d0587c0d9:

  • Canonical tsgo: 89d5d5b2849a0db0957065889ca58536fa6d2e4a
  • Exact conformance: 5753/5907 (97.39%)
  • Exact mismatches: 154
  • Prior pin 24fabe95: 5755/5907, 152 mismatches
  • Baseline movement from the 66-commit tsgo update: 2 net additional mismatches

The complete 154-name frontier was captured with a compact failure-only survey. Next implementation batch is the shared false definite-assignment cluster (moduleExportDuplicateAlias* plus assignmentToVoidZero1), followed by the larger JSDoc/module/JSX families. All future parity numbers will be measured from complete or explicitly scoped runs, not projected cumulative arithmetic.

22 days ago

Pushed 1ed74011e (fix(ts-checker): align commonjs writes and generic guards).

Scoped exact flips against tsgo 89d5d5b2 (5/5 passed):

  • moduleExportDuplicateAlias
  • moduleExportDuplicateAlias2
  • moduleExportDuplicateAlias3
  • assignmentToVoidZero1
  • typeGuardsTypeParameters

Implementation:

  • CommonJS export assignment targets are classified before future-write checks, removing false TS2565 diagnostics from declaration placeholders and chained void 0 writes while preserving genuine RHS early-read errors.
  • Unconstrained generic primitive guards form T & primitive, retaining both generic identity and guarded members.

Verification:

  • Exact focused gate: 5/5
  • Full checker: 3949/3949
  • Patch: 57 insertions, 5 deletions

Latest complete aggregate remains the pre-change measured 5753/5907 checkpoint; this comment records the measured scoped removal only, pending a later batched full census.

22 days ago

Pushed 4be0386ed (fix(ts-checker): preserve default export value status).

Exact tsgo-main movement:

  • exportsAndImports4-es6: exact pass
  • exportsAndImports4: exact pass
  • exportsAndImports4-amd: exact pass
  • Focused family gate: 3/3

The virtual-module runtime-status path now reuses the established export classifier, so export default <expression> remains a value-space export for both import { default as x } and paired default imports.

Verification:

  • focused checker regression: pass
  • exact family: 3/3
  • patch: 18 insertions, 1 deletion

The latest complete aggregate remains the measured pre-batch 5753/5907 checkpoint; this records three additional scoped exact removals pending the next consolidated census.

22 days ago

Pushed 41512f99c (fix(ts-driver): anchor missing jsx runtime at tag).

This ports the TS2875 anchor behavior to the parsed JSX tree: the missing automatic-runtime diagnostic now attaches to the earliest JSX element/fragment rather than the first raw <, which could be the <reference text inside a triple-slash directive. The regression reproduces that reference-directive shape and asserts the exact byte position.

Measured verification:

  • ts_driver package suite: pass
  • exact custom-import JSX family: 4/4 passing (jsxJsxsCjsTransformCustomImport, jsxJsxsCjsTransformKeyPropCustomImportPragma, jsxJsxsCjsTransformCustomImportPragma, jsxJsxsCjsTransformKeyPropCustomImport)
  • patch size: 21 insertions, 3 deletions

No aggregate parity projection here; the next aggregate will come from a consolidated census.

22 days ago

Pushed 917083e41 (perf(ts-conformance): filter fixtures before loading).

Targeted exact runs now apply HOME_TS_CONFORMANCE_FILTER during the directory walk, before source reads, baseline selection, and fixture normalization. Include/exclude semantics are centralized and covered by a focused regression.

Measured verification:

  • filter predicate regression: pass
  • same exact custom-import JSX family: 4/4 passing
  • rebuilt targeted-run wall time: about 3.5 minutes -> 20 seconds
  • patch size: 36 insertions, 38 deletions

This is infrastructure only; it does not alter the measured parity aggregate, but it makes the remaining semantic batches substantially faster to verify.

22 days ago

Pushed 0d58cc676 (fix(ts-checker): align update and exponentiation errors).

This ports four related tsgo checker behaviors:

  • arithmetic validation precedes update-reference validation for enum-valued expressions
  • invalid null update operands retain both TS18050 and TS2357
  • parser-synthesized missing negation operands do not produce TS2872
  • non-constructable new anchors and strict void arithmetic diagnostics match source-level tsgo positions/codes

Measured verification:

  • exact batch: 6/6 passing (incrementOperatorWithAnyOtherTypeInvalidOperations, incrementOperatorWithEnumTypeInvalidOperations, decrementOperatorWithAnyOtherTypeInvalidOperations, logicalNotOperatorInvalidOperations, exponentiationOperatorWithNew, emitExponentiationOperator4)
  • consolidated checker run: 3,954 passing, with its sole failure coming from the initial form of the newly-added anchor regression; after correcting that setup, the focused regression passed
  • patch size: 106 insertions, 11 deletions

No aggregate projection; these are scoped exact measurements. Concurrent fetch commits df66e090c and 9c3a36024 were preserved on main.

22 days ago

Pushed 222087bd0 (fix(ts-checker): align declaration scope diagnostics).

This batch ports TypeScript declaration behavior for later-parameter/body-var default scope, implementation-aware overload modifier diagnostics, fresh object comparisons against primitive operands, and generic-IIFE call type-argument scanning.

Scoped exact verification: 8/8 fixtures pass (the final residual rerun moved from 6/8 to 8/8):

  • functionOverloadErrorsSyntax
  • functionOverloadErrors
  • parameterInitializersForwardReferencing1
  • functionImplementations
  • parameterInitializersForwardReferencing
  • parameterInitializersForwardReferencing.2
  • functionImplementationErrors
  • parameterInitializersForwardReferencing1_es6

The complete ts_checker suite also passes. Patch size: 174 insertions / 28 deletions in one checker file. No aggregate parity count is claimed here; that remains reserved for the consolidated census.

22 days ago

Measured consolidated exact census at pushed 222087bd0 against canonical tsgo 89d5d5b2849a0db0957065889ca58536fa6d2e4a:

  • 5,777/5,907 exact (97.80%)
  • 130 mismatches
  • Movement from the prior complete census: +24 exact fixtures (5,753 -> 5,777), 154 -> 130 mismatches
  • Full survey completed without crashes.

The compact frontier has been captured outside the worktree for the next batches. Two fixtures previously proven exact in isolation (decrementOperatorWithEnumTypeInvalidOperations and dependentDestructuredVariables) fail only in the complete run, so I am treating order-dependent state contamination as a distinct logical parity defect rather than counting every remaining name as an isolated semantic gap.

22 days ago

Pushed 0f7be1011 fix(ts-checker): align enum and assignment flow.

Parity movement:

  • Flipped 3 known exact failures to passes: decrementOperatorWithEnumTypeInvalidOperations, assignmentTypeNarrowing, and constEnumPropertyAccess2.
  • Targeted exact comparison moved from 0/3 to 3/3.
  • Known frontier moves from 130 to 127 failures (projected 5780/5907, pending the next full-corpus census).
  • Patch size: 116 insertions, 18 deletions in packages/ts_checker/src/check.zig.

Logical ports:

  • Plain assignment targets no longer retain spurious definite-assignment reads.
  • Annotated top-level const array initializers select their uniquely compatible union constituent without leaking across virtual files.
  • Invalid enum update expressions now prefer TS2357 when member lookup has already failed.
  • Const-enum dynamic access is checked before numeric reverse mapping and anchored at the computed key.
  • Enum-annotated assignment errors preserve literal source and enum target display names.

Validation:

  • 3961/3961 checker tests passed.
  • 3/3 targeted exact TypeScript conformance fixtures passed.
  • zig fmt --check and git diff --check passed.
22 days ago

Pushed 085801c98 fix(ts-checker): align disposable and platform relations.

Parity movement:

  • Flipped 4 known exact failures to passes: usingDeclarations.14, usingDeclarationsWithIteratorObject, intlNumberFormatES5UseGrouping, and errorSuperPropertyAccess.
  • Targeted exact comparison moved from 0/4 to 4/4.
  • Known frontier moves from 127 to 123 failures (projected 5784/5907, pending the next full-corpus census).
  • Patch size: 109 insertions, 17 deletions in packages/ts_checker/src/check.zig.

Logical ports:

  • Missing synchronous dispose members now use tsgo's structural TS2741 relation, while present but non-callable members retain TS2850.
  • Iterator-object disposable behavior follows the tsgo-main baseline.
  • Intl.NumberFormatOptions.useGrouping and resolved options are typed, including optional boolean | undefined diagnostics.
  • Private static fields accessed through super retain TS2341; instance data fields keep the existing super-specific suppression.

Validation:

  • 3963/3963 checker tests passed.
  • 4/4 targeted exact TypeScript conformance fixtures passed.
  • zig fmt --check and git diff --check passed.
22 days ago

Pushed 86a9c8542 (fix(ts-checker): align generator and spread diagnostics) to main.

  • Flipped 2 exact tsgo fixtures: YieldExpression6_es6 and callWithSpread2.
  • Recursive delegated-yield diagnostics now display the inferred generator function type.
  • Non-tuple array spreads preserve optional parameter undefined in mismatch diagnostics, while tuple spreads retain concrete element displays.
  • Known frontier: 123 -> 121 failures; projected exact parity: 5784/5907 -> 5786/5907.
  • Patch: 64 insertions, 6 deletions.
  • Validation: 2/2 focused exact fixtures, focused checker coverage, 3963/3963 full checker tests, zig fmt --check, and git diff --check.
22 days ago

Pushed 8c3c8616c (fix(ts-checker): align return and recovery diagnostics) to main.

  • Flipped 3 exact tsgo fixtures: invalidReturnStatements, awaitUsingDeclarationsInForAwaitOf.3, and labeledStatementDeclarationListInLoopNoCrash2.
  • Class return diagnostics now elaborate missing properties in own-before-inherited order.
  • Top-level for await validation now uses the driver-selected target instead of every value in a multi-target source directive.
  • Invalid labeled declarations no longer leak a follow-on TS7034 recovery diagnostic.
  • Known frontier: 121 -> 118 failures; projected exact parity: 5786/5907 -> 5789/5907.
  • Patch: 76 insertions, 4 deletions.
  • Validation: 22/22 focused checker tests, 3/3 focused exact fixtures, 3966/3966 full checker tests, checker formatting, and diff checks.
22 days ago

Pushed 42cdb8341 (fix(ts-checker): refine destructuring argument errors) to main.

  • Flipped 3 exact tsgo fixtures: destructuringParameterDeclaration2, destructuringParameterDeclaration4, and destructuringParameterDeclaration8.
  • Object-literal call diagnostics preserve optional undefined without changing assignment/return displays.
  • Overlong tuple call arguments prefer precise scalar nested-slot errors; tuple assignments retain aggregate arity diagnostics.
  • Known frontier: 118 -> 115 failures; projected exact parity: 5789/5907 -> 5792/5907.
  • Patch: 67 insertions, 8 deletions.
  • Validation: focused display and aggregate-assignment coverage, 3/3 exact fixtures, 3968/3968 full checker tests, checker formatting, and diff checks.
22 days ago

Pushed 32bdbb234 (fix(ts-checker): align satisfaction diagnostics) to main.

  • Flipped typeSatisfaction_errorLocations1 by resolving all 5 residual diagnostic mismatches.
  • satisfies unknown now widens decontextualized object-property literals in call and expression-bodied return diagnostics.
  • Readonly tuple satisfaction against mutable arrays now reports TS4104.
  • Homogeneous literal unions widen to their primitive in argument prose.
  • Known frontier: 115 -> 114 failures; projected exact parity: 5792/5907 -> 5793/5907.
  • Patch: 92 insertions, 5 deletions.
  • Validation: focused satisfaction coverage, 1/1 exact fixture, 3969/3969 full checker tests, checker formatting, and diff checks.
22 days ago

Pushed e67562347 (fix(ts-checker): preserve enum argument identity) to main.

  • Flipped typeArgumentInferenceWithObjectLiteral.
  • Distinct enum arguments now render their owning enum names before shared numeric literal values, eliminating self-equal diagnostics such as 0 not assignable to 0.
  • Known frontier: 114 -> 113 failures; projected exact parity: 5793/5907 -> 5794/5907.
  • Patch: 30 insertions.
  • Validation: focused enum-argument coverage, 1/1 exact fixture, 3970/3970 full checker tests, checker formatting, and diff checks.

Sign in to comment on this issue.