Tuples as types for rest ...arguments · Issue #5331 · microsoft/TypeScript (original) (raw)
This feature could be used in observable-like generic classes/interfaces:
interface EventSource<Args extends any[]> { observe(listener: (...args: Args)): void; map(mapping: (...args: Args) => T): EventSource<[T]>; }
Currently the only way I know of is to fallback to any
.