-
Notifications
You must be signed in to change notification settings - Fork 5.6k
deno types
to output typings to a single file
#9377
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
Comments
Specifically, interoperability between Deno and TSC seems unachievable at present. Deno doesn't understand TSC's imports, nor TSC's .d.ts files because those also use the incorrect file extensions. On the other hand, TSC doesn't understand Deno's imports. There doesn't even seem to be any tools out there that would allow automating converting between the two formats. Ideally, you'd be able to bundle the typings of a project into a single .d.ts file in order to avoid the importing conflicts and allow you to be able to use the same code base for both Deno and TSC consumers. |
deno types
to provides typings for a given filedeno types
to output typings to a single file
Duplicate of #3385 (You can already set |
Does Lines 86 to 90 in 1fb5858
|
Oh never mind, it seems |
What
As it stands, there doesn't seem to be a way to generate typings for a file, or files, using Deno. It might be possible with
Deno.emit
, using the 2nd argument (CompilerOptions
), but i haven't checked this and I'm not too confident it can.It also seems like
deno types
could be expanded upon, ie there's a great opportunity to expand upon this subcommand.But what I propose is for
deno types
(and ideally a programatic way as well) to create the typings for the given file or directory that outputs to a single fileHow
Why
Well say I have a project that uses typescript. I plan to move over from Node to Deno, but I need typings. It seems impossible to do this with Deno, halting on that projects progress to make the beautiful journey of moving to Deno. This issue. is specifically with emitting a bundled
.d.ts
file.Whilst I can use
Deno.emit(file, { compilerOptions: { declaration: true }})
, it still doesn't provide the bundled typingsExample
Here is an example, of me wanting to create a single bundled
.d.ts
file using theemit
method, but it not actually providing typings:As you can see, it doesn't provide any typings
The text was updated successfully, but these errors were encountered: