Open trgwii opened 3 years ago
@bartlomieju you might be interested in this, I see you separated the deno_net code out from core.
I suspect the Deno plugin for JetBrains IDEs is broken in 1.12 because of this:
( https://deno.land/manual/getting_started/setup_your_environment#jetbrains-ides )
@bartlomieju the types are concatenated in the file, but we need to strip out the lib reference somehow as it does break deno types
output.
@bartlomieju the types are concatenated in the file, but we need to strip out the lib reference somehow as it does break
deno types
output.
Do we even need to add /// <reference lib="deno.net" />
to lib.deno.ns.d.ts
? No other lib is linked that way.
@bartlomieju Because deno.net is the only lib that exposes ns APIs. The other libs are all linked into deno.shared_globals because they implement web APIs.
@bartlomieju Because deno.net is the only lib that exposes ns APIs. The other libs are all linked into deno.shared_globals because they implement web APIs.
Okay, then why would we need to strip that single reference and not all other references? I'm a bit lost on what's the problem here.
The deno.net
lib is already concatenated in the deno types
output: https://github.com/denoland/deno/blob/15b0e61de523c1a0157e754379f0ec7decf0c23e/cli/main.rs#L333-L357
I just checked against latest commit on main
and I can see proper output for types, even deno doc --builtin
shows all symbols from deno_net
crate (both stable and unstable).
Yes, I was mistaken, types are concatenated, but the broken reference triple slash directive breaks other tooling that tries to read the types, and I assume the purpose of the deno types command is to support other tooling?
deno types
no longer sufficiently outputs all Deno types, but instead outputs some text with the following line near the top:/// <reference lib="deno.net" />
This means that it's not possible for TypeScript or other tools to resolve the full Deno API based on output from
deno types
anymore (since 1.12 at least).I think it would be more useful to concat the various dts files when a user runs
deno types
, so a full representation of the API is outputted. ( https://github.com/denoland/deno/blob/main/extensions/net/lib.deno_net.d.ts )