You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background:ADR-0012 documents the current LINQ runtime as an eager wrapper class hierarchy (`EnumerableBase` with one concrete subclass per operator), explicitly noting this is not tree-shakeable and that migration to pipe-based is tracked separately. This is that issue.
Goal
Replace the wrapper-class hierarchy with standalone operator functions composed via `pipe()`, so bundlers can drop operators the user's code never touches. Preserves lazy semantics, preserves the C# LINQ surface on the user side, and only churns the generated TS output (a one-time regeneration event).
Scope
Define `OperatorFn<T, R>` type + typed `pipe()` overloads (RxJS-style)
Convert every composition operator into a standalone function:
`where(pred)`, `select(fn)`, `selectMany(fn)`, `orderBy(fn)`, `orderByDescending(fn)`, `take(n)`, `skip(n)`, `distinct()`, `distinctBy(fn)`, `groupBy(fn)`, `concat(other)`, `takeWhile(pred)`, `skipWhile(pred)`, `reverse()`, `zip(other, fn)`, `append(item)`, `prepend(item)`, `union(other)`, `intersect(other)`, `except(other)`
Background: ADR-0012 documents the current LINQ runtime as an eager wrapper class hierarchy (`EnumerableBase` with one concrete subclass per operator), explicitly noting this is not tree-shakeable and that migration to pipe-based is tracked separately. This is that issue.
Goal
Replace the wrapper-class hierarchy with standalone operator functions composed via `pipe()`, so bundlers can drop operators the user's code never touches. Preserves lazy semantics, preserves the C# LINQ surface on the user side, and only churns the generated TS output (a one-time regeneration event).
Scope
`where(pred)`, `select(fn)`, `selectMany(fn)`, `orderBy(fn)`, `orderByDescending(fn)`, `take(n)`, `skip(n)`, `distinct()`, `distinctBy(fn)`, `groupBy(fn)`, `concat(other)`, `takeWhile(pred)`, `skipWhile(pred)`, `reverse()`, `zip(other, fn)`, `append(item)`, `prepend(item)`, `union(other)`, `intersect(other)`, `except(other)`
Constraints
User C# code is unaffected — this is a runtime + lowering refactor. The round-trip is: regenerate, rebuild, re-run tests, ship.
Part of #14.