Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(repl): allow using "type" command on types/interfaces #1401

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ejose19
Copy link
Contributor

@ejose19 ejose19 commented Jul 18, 2021

This makes "type" command return a more accurate description than the currently any for types/interfaces. It's worth noting that until microsoft/TypeScript#25894 is fixed, interfaces/enums will be shown as just "$kind $identifier".

Based on https://stackoverflow.com/a/55777714.

@codecov
Copy link

codecov bot commented Jul 18, 2021

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.72%. Comparing base (e865076) to head (29f103e).
Report is 185 commits behind head on main.

Files Patch % Lines
src/repl.ts 72.72% 2 Missing and 1 partial ⚠️
src/index.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
Files Coverage Δ
src/index.ts 77.92% <0.00%> (-0.79%) ⬇️
src/repl.ts 76.66% <72.72%> (+2.56%) ⬆️

... and 2 files with indirect coverage changes

@ejose19
Copy link
Contributor Author

ejose19 commented Jul 19, 2021

Regarding the undefined as unknown as ${identifier}, it's required due #1126 (#1126 (comment)), so it's done this way to avoid having errors in subsequent commands.

@ejose19
Copy link
Contributor Author

ejose19 commented Jul 19, 2021

Had to split the type tests into 2 due to the current linked issue, as getQuickInfoAtPosition is using an invalid position after the first type call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant