feat(dx): instantiate all boundary types #76
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was writing the documentation and realized the errors and quickinfo are horrible, I mean I knew it previously and I tried this before but apparently it did not work or I was doing it wrong, revisited it and now it works.
Basically typescript skips instantiating type for performance reasons and just shows it's name, but with
A.Instantiate
we force typescript to compute and instantiate it.It comes with some cost that typescript has to do more work and in worst case it might result in "instantiation is too deep or possibly infinite" but I think that won't happen. Even if it happens we'll basically revert this and publish a patch, as it has got nothing to do with code only error messages and quickinfo.
The boundary positions are namely: state, send, effectParameter, effectCleanupParameter, guardParameter.
A few examples of the change
Before:
After:
Before:
After:
Before:
After:
Before:
After: