Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Upgrade definition file to TypeScript v2.2.+ #278

Open
gcanti opened this issue Apr 22, 2017 · 2 comments
Open

Upgrade definition file to TypeScript v2.2.+ #278

gcanti opened this issue Apr 22, 2017 · 2 comments
Milestone

Comments

@gcanti
Copy link
Owner

gcanti commented Apr 22, 2017

This will be a major refactoring (and likely a breaking change for TypeScript users). There are some techniques developed in io-ts that can be ported to tcomb, in particular the usage of indexed and mapped types

@gcanti gcanti added this to the 3.3.0 milestone Apr 22, 2017
@jaen
Copy link

jaen commented Aug 8, 2017

Incidentally, I have some more accurate typings for struct that I needed lying around, not sure if they will be helpful since they are pretty rudimentary, but no harm done linking to them: https://github.com/jaen/tcomb/commit/943e8eb3aec290ac0eec8703ae5add115f085437

@DanielSWolf
Copy link

What I really like about io-ts is the fact that a runtime type definition also serves to define the compile-time TypeScript type. That is, I only have to define a given type once. tcomb, on the other hand, allows me to do runtime type validation, but I also have to define a (redundant) TypeScript type.

Are you planning to implement something similar in this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants