Skip to content

tsox vs tsc 6.0.3 — corpus parts 01, 02, 03, 04, 05 (--module, 500 files each) ​

Command per part: ./scripts/compare-local.sh tests/typescript-testcases/typescript-6.0.3/part-NN --module --runs 1 --timeout 90 --json

Hangs found (tsox does not finish) ​

  • part-02: compiler__chainedSpecializationToObjectTypeLiteral.ts — tsox ran past 90 s (also times out alone at 3 s). Excluded from the part-02 numbers (499 files). Trigger: Sequence<T> with groupBy<K>(...): Sequence<{ key: K; items: T[] }>, then s.groupBy(...) and .each(x => x.key).
  • part-05: compiler__genericClasses4.ts — tsox took 61.6 s for the whole part (others ~0.2 s); alone it exceeds 3 s. Included in the numbers. Trigger: class Vec2_T<A> with apply<B>(f: Vec2_T<(a: A) => B>): Vec2_T<B> (file comment: "once caused stack overflow"). Both look like generic instantiation that grows each level, the same family as tests/lib-probe-hangs/ (not confirmed).

Notes: counts per code are lines (a file can contribute several); examples are the first message seen per code. tsox build: working tree with an uncommitted typeof change. --timeout 5 stops tsc (about 6 s per 500-file part), so tsc used --timeout 90.

Per part ​

partMATCHMSG DIFFCODE DIFFGAPFALSE POSMIXEDagree linesexact linestsox mstsc ms
0120732325269233/500259/996144.36087
02240319205239262/499429/1639177.26805
032914111523210306/500157/783235.16127
04227146221239247/500138/1158157.47475
0523514221991911271/500258/1031616245834
all12003881102910348

Gaps by tsc code (errors tsox misses), top 15 ​

codecountexample
TS2454269Variable 'a' is used before being assigned.
TS2322261Type 'null' is not assignable to type 'Result'.
TS7006232Parameter 'x' implicitly has an 'any' type.
TS2304226Cannot find name 'B'.
TS7005180Variable 'x' implicitly has an 'any' type.
TS18048163'T' is possibly 'undefined'.
TS2339130Property 'collection' does not exist on type '{ readonly primaryPath: any; }'.
TS1005102',' expected.
TS230099Duplicate identifier 'myFn'.
TS234585Argument of type 'symbol' is not assignable to parameter of type 'object'.
TS124084Unable to resolve signature of property decorator when called as an expression.
TS236769This comparison appears to be unintentional because the types '0' and '1' have n
TS700867Member 'var' implicitly has an 'any' type.
TS256465Property 'a' has no initializer and is not definitely assigned in the constructo
TS703160Binding element 'foo' implicitly has an 'any' type.

False positives by tsox code (wrong errors), top 15 ​

codecountexample
TS2339181Property 'collection' does not exist on type '{ readonly primaryPath: any; }'.
TS2322118Type 'null' is not assignable to type 'Result'.
TS234585Argument of type 'symbol' is not assignable to parameter of type 'object'.
TS234415Type 'GetProps<C>' does not satisfy the constraint 'Shared<TInjectedProps, GetPr
TS1804811'T' is possibly 'undefined'.
TS700811Member 'var' implicitly has an 'any' type.
TS248810Type 'number' must have a [Symbol.iterator]() method that returns an iterator.
TS255410Expected 0 arguments, but got 3.
TS23499This expression is not callable.
TS70538Element implicitly has an 'any' type because expression of type '"arguments"' ca
TS180475'x' is possibly 'null'.
TS27393Type '{ a: error; }' is missing the following properties from type '{ a: string;
TS23513This expression is not constructable.
TS23622The left-hand side of an arithmetic operation must be of type 'any', 'number', '
TS23041Cannot find name 'B'.

Exact matches, top 8 ​

codecountexample
TS7006325Parameter 'x' implicitly has an 'any' type.
TS2564230Property 'a' has no initializer and is not definitely assigned in the constructo
TS7010149'foo', which lacks return-type annotation, implicitly has an 'any' return type.
TS2322149Type 'null' is not assignable to type 'Result'.
TS700863Member 'var' implicitly has an 'any' type.
TS233945Property 'collection' does not exist on type '{ readonly primaryPath: any; }'.
TS230442Cannot find name 'B'.
TS234541Argument of type 'symbol' is not assignable to parameter of type 'object'.

Analysis notes (added when saved as baseline) ​

Arithmetic from the table above, 2,499 files: MATCH 1200 (48%), GAP 1029 (41%), FALSE POS 103 (4%). Reported separately as 40% / 51% / 7%; reconcile which run that came from.

Top-15 gap lines: 2,092.

  • tsc codes with no tsox variant (764 lines, 37%): TS2454 (269), TS7005 (180), TS1005 (102), TS1240 (84), TS2367 (69), TS7031 (60).
  • Codes tsox can emit but misses (about 1,300 lines): TS2322, TS7006, TS2304, TS18048, TS2339, TS2300.

Not done: per-file ranking (files unlocked per code) and a count of 9000-series "Unimplemented*" / "Unresolvable*" warnings. Both need the per-file --json output.

MIT OR Apache-2.0