Repository navigation
fix(core): show drafts, outputs and nodes as plain shapes in hovers - #64
Merged
Merged
Conversation
Contributor
🦋 Changeset detectedLatest commit: 1900553 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merged
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
Hovers show drafts, outputs and definitions as plain object shapes at every depth. TypeScript prints a type that an alias builds under the name of that alias, so:
Simplifyends with& {}, and nested drafts and outputs no longer print asSimplify<DraftObject<…> & {} & {…}>.GroupDefinitionOfandFieldDefinitionOfare conditional types, so a definition prints asGroupDefinition<…>orFieldDefinition<…>with its values instead of its schema types.Simplify, soNoInferandEmptyObjectno longer show.TypeScript 5.9 and 7 print the same text apart from the order of keys.
Testing
hover.test.tsasks the TypeScript 5.9 language service for the quick info of a fixture and compares the text. Undoing any one of the three changes fails at least one of its tests. Core installs TypeScript 5.9 astypescript-5, since TypeScript 7 has no JS API.async-validation.test.tschecks that changes within the pause run a change-triggered check once, for the last value.Docs
debounceMssets the wait.Not covered
A group node lists its input, output and draft before its children, so for a group with nested groups the hover gets long and the children are cut off. The docs keep type queries on fields.