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

Provide deno check as runtime API #15478

Open
jsejcksn opened this issue Aug 15, 2022 · 0 comments
Open

Provide deno check as runtime API #15478

jsejcksn opened this issue Aug 15, 2022 · 0 comments
Labels
suggestion suggestions for new features (yet to be agreed)

Comments

@jsejcksn
Copy link
Contributor

jsejcksn commented Aug 15, 2022

Deno.emit has come and gone, and plenty of suggestions can be found pointing toward using esbuild to transpile TypeScript source code at runtime, but there is now a lack of a runtime API for type-checking.

Previously, with Deno.emit, type-related diagnostics were available for determining if transpiled source code had type-related problems. Now, there is no way to know if the transpiled source is unsound from a type system perspective.

It would be very useful for Deno to provide runtime API access to its type-checking functionality and diagnostics. It's not possible to use tsc or tools in its ecosystem for this purpose (primarily because Deno's import specifier syntax is incompatible).

I believe this should be provided directly from the runtime on the Deno namespace (instead of as an external module like https://github.com/denoland/deno_emit) because the modified version of the compiler that is needed for this task is already so tightly-integrated. Deno saliently advertises TypeScript integration as one of its core features (home page, introduction in the manual, etc.). I find it unexpected for such a platform not to provide TypeScript runtime integration.

Related:

@kitsonk kitsonk added the suggestion suggestions for new features (yet to be agreed) label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

2 participants