io-ts icon indicating copy to clipboard operation
io-ts copied to clipboard

Variadic definitions for `intersection`

Open sledorze opened this issue 5 years ago • 3 comments

@gcanti I'm not sure you went that path of not but that may be usable to generalise 'intersection' signature: https://github.com/gcanti/io-ts/blob/master/src/index.ts#L1191

I've tried some modifications but it seems to fail with previous typescript versions. Doing a PR in order to iterate/discuss on this.

Branch 312 https://github.com/gcanti/io-ts/tree/312

sledorze avatar Mar 26 '19 21:03 sledorze

@sledorze I'd wait for an official support https://github.com/Microsoft/TypeScript/issues/29594#issuecomment-460761895

gcanti avatar Mar 27 '19 06:03 gcanti

@gcanti thanks for sharing that thread

sledorze avatar Mar 27 '19 07:03 sledorze

Any news about this issue ? Is there a workaround to use intersection with more than 5 codecs ? Maybe something based on #431 but the type seems a little bit harder to write here...

clementheliou avatar Aug 28 '20 14:08 clementheliou