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

Merging #1401 (29f103e) into main (e865076) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

Impacted Files Coverage Δ
src/index.ts 77.92% <0.00%> (-0.79%) ⬇️
src/repl.ts 76.66% <72.72%> (+2.56%) ⬆️
src/transpilers/swc.ts 73.80% <0.00%> (-1.20%) ⬇️
src/bin.ts 91.40% <0.00%> (ø)

@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.

None yet

1 participant