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

Feature Request: Live Type Logging for TypeScript #821

Open
imsahsol opened this issue Oct 11, 2022 · 2 comments
Open

Feature Request: Live Type Logging for TypeScript #821

imsahsol opened this issue Oct 11, 2022 · 2 comments

Comments

@imsahsol
Copy link

Issue description or question

It would be a great addition to Quokka, to have Live Type Logging as well. Similar to what's been already implemented in Quokka for Live Logging of the values. Below is an example from TypeScriptLang playground, which displays their implementation for this feature:

image

I was wondering if is there a way for this to be implemented for Quokka.

@smcenlly
Copy link
Member

Unfortunately this is not something that would be easy to add to Quokka.

Quokka only knows about runtime values and runtime types, while the TypeScriptLang playground is getting the type information from the language service. By default, Quokka effectively discards all type information and type errors when it runs your TypeScript code; this is one of the many things that Quokka does to run your code as quickly as possible.

We would not be able to implement this feature without some major changes to how Quokka integrates with TypeScript so I don't think it will be something that we decide on for our short to mid-term roadmap as we have some other features that we think will be more valuable.

@smcenlly smcenlly changed the title Feature Request: Live Type Logging Feature Request: Live Type Logging for TypeScript Oct 11, 2022
@satvikpendem
Copy link

@SahandSoltanieh This already exists in VSCode if you use it. The feature is called Inlay Hints and works for any language that's supported.

image

Setting: typescript.inlayHints.variableTypes.enabled

There are other types of hints too, check out the link I posted.

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

No branches or pull requests

3 participants