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

Option to type check TypeScript? #130

Open
jflatow opened this issue Aug 10, 2023 · 3 comments
Open

Option to type check TypeScript? #130

jflatow opened this issue Aug 10, 2023 · 3 comments

Comments

@jflatow
Copy link

jflatow commented Aug 10, 2023

How difficult would it be to add a compiler option to check TypeScript input code? If reasonable, I wouldn't mind taking a stab at adding it myself.

@jflatow
Copy link
Author

jflatow commented Aug 10, 2023

Ok interesting, I took a peek and it looks like swc which is used in this module doesn't support type-checking, so it would have to go through an alternate path of either trying to use deno::tsc (not sure if this is exposed) or potentially stc. I expect it would only make sense to use the same method that deno uses itself, which is through the deno::tsc (https://github.com/denoland/deno/blob/main/cli/tools/check.rs#L136).

@yacinehmito
Copy link
Contributor

yacinehmito commented Aug 11, 2023

In any case, a programmatic API to perform type-checking with Deno probably wouldn't be part of deno_emit.

And if you need to do it right now as a replacement for deno bundle, then deno check works.

@jflatow
Copy link
Author

jflatow commented Aug 11, 2023

😞 The compiler runtime API was nice. I thought the idea was to move that out of core into a separate library and that was deno_emit. It seems the natural place for such an option, and indeed Deno.emit used to support it...

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

No branches or pull requests

2 participants