Closed moranje closed 5 years ago
That is the tricky one but you can try to talk on that matter at https://gitter.im/Microsoft/TypeScript
Yea, full-blown Typescript support missing for stamps is something that forced me to leave this concept when I started using TypeScript. Unfortunately, I am not that well versed in these advanced and dynamic types to figure out how it should work. Perhaps there might be some inspiration in mobx-state-tree
which is written in TypeScript and does these kinds of crazy compositions. It's not perfect either, but it mostly works.
I've updated the example because figured out that stampit()
returns a factory function and the factory function returns an instance. That only partly solves my problem it seems...
I've figured it out, I'm closing this but I have adjusted the example for future reference.
Martien
I'm trying to express the result composed Stamp in typescript.
Leaving this here for documentation purposes.
Martien