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.
This PR adds a new internal TComputed type which is used to auto dereference computed types on Module import.
TypeBox has two kinds of types. Immediate types (such as TObject, TTuple) and Computed Types (such as TPartial, TOmit). Historically, Computed types could only be passed an Immediate type, where the Computed type performs some action on the Immediate types schematics. However when passing a Ref, the Computed type only sees the Ref, not the Immediate type (meaning the Computed type cannot perform any reasonable action)
With the introduction of Modules. It becomes possible to auto dereference target structures. As of 0.34.1, when passing a Computed type a Ref type, the Computed type will return a deferred TComputed structure which houses the target name of the Computed type, and a TRef containing the target reference.
The TComputed structure is used internal to the Module to dereference the target Type (with surrounding types), with the Target available via Import.
This PR implements TComputed for
Note: The Index type is known to be cause instantiation problems when used interior to Modules. This will be resolved in subsequent revisions.