Fix mapped type hover nil dereference - #64112
Merged
Daniel Rosenwasser (DanielRosenwasser) merged 2 commits intoSep 1, 2026
Merged
Fix mapped type hover nil dereference#64112Daniel Rosenwasser (DanielRosenwasser) merged 2 commits into
Daniel Rosenwasser (DanielRosenwasser) merged 2 commits into
Conversation
Copilot started work on behalf of
Daniel Rosenwasser (DanielRosenwasser)
August 31, 2026 19:30
View session
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix nil dereference when printing back mapped type
Fix mapped type hover nil dereference
Aug 31, 2026
Daniel Rosenwasser (DanielRosenwasser)
approved these changes
Aug 31, 2026
Daniel Rosenwasser (DanielRosenwasser)
marked this pull request as ready for review
August 31, 2026 22:40
Copilot started reviewing on behalf of
Daniel Rosenwasser (DanielRosenwasser)
August 31, 2026 22:41
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents mapped-type hover crashes when the property type is absent.
Changes:
- Guard mapped-type property type printing against
nil. - Add fourslash hover regression coverage and baseline.
Show a summary per file
| File | Description |
|---|---|
tsc/internal/printer/printer.go |
Conditionally emits mapped property types. |
tsc/internal/fourslash/tests/hoverMappedTypePropertyJSDoc_test.go |
Adds hover regression test. |
tsc/testdata/baselines/reference/fourslash/quickInfo/hoverMappedTypeWithoutPropertyType.baseline |
Records expected hover output. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
Jake Bailey (jakebailey)
approved these changes
Sep 1, 2026
Daniel Rosenwasser (DanielRosenwasser)
deleted the
copilot/fix-nil-dereference-error
branch
September 1, 2026 18:13
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.
Description
Hovering a function whose parameter contains
{ [K in keyof T] }panics while printing the signature because the mapped property type is absent.: Typeonly when the mapped-type property type exists.