format: add TypeScript types for function call contexts#186
Merged
gnidan merged 1 commit intocall-returnfrom Mar 11, 2026
Merged
format: add TypeScript types for function call contexts#186gnidan merged 1 commit intocall-returnfrom
gnidan merged 1 commit intocall-returnfrom
Conversation
Add Type.Reference, Type.Specifier, and type guards for the
new function call context schemas (invoke, return, revert).
- Type.Reference: { id: string | number } for type references
- Type.Specifier: Type | Reference union (matches type/specifier schema)
- Context.Function.Identity: shared function identity fields
- Context.Invoke: internal calls, external calls, contract creation
- Context.Return: function return with data and optional success
- Context.Revert: function revert with optional reason/panic
- Update Variable.type to accept Type.Specifier (was Type only)
- Update Type.Wrapper to use Type.Specifier
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Type.ReferenceandType.Specifiertypes to match the newtype/referenceandtype/specifierschemasContext.Function.Identity(shared function identity),Context.Invoke(internal/external/create),Context.Return(data + success),Context.Revert(reason + panic) types with type guardsVariable.typefromTypetoType.Specifierto match the variables schema's use oftype/specifierType.Wrapperto useType.Specifier