D
Deno

help

npm specifier import types

Aandykais10/12/2022
so when I do something like
import * as rx from 'npm:rxjs'

console.log(rx)
import * as rx from 'npm:rxjs'

console.log(rx)
I do have the correct code imported, but types are all any. Is this the expected state of npm imports, or is there a bug here? I am running
deno 1.26.1 (release, x86_64-unknown-linux-gnu)
v8 10.7.193.3
typescript 4.8.3
deno 1.26.1 (release, x86_64-unknown-linux-gnu)
v8 10.7.193.3
typescript 4.8.3
UUUnknown User10/12/2022
4 Messages Not Public
Sign In & Join Server To View
Aandykais10/12/2022
thanks for that clarification
Bbartlomieju10/12/2022
@dsherret is working on types support, it will probably ship in V1.27
Aandykais11/23/2022
@.bartlomieju / @dsherret are npm types supported in 1.28? It seems like they are https://github.com/denoland/deno/issues/15960, but imports like
import * as rx from 'npm:rxjs'
import * as rx from 'npm:rxjs'
or
import { ScriptServer } from 'npm:@scriptserver/core'
import { ScriptServer } from 'npm:@scriptserver/core'
seem to still have any types
Ddsherret11/23/2022
if you get a chance could you open a bug (i'm just heading out)? It looks like rxjs has an entry for "types": "index.d.ts",, but then that file doesn't exist in the package, so it looks like in that scenario we should use the exports -> . -> types entry for @scriptserver/core it distributes its types, but then it doesn't have a "types" entry in its package.json, but it seems like typescript still figures it out by resolving the "main" entrypoint and looking for the corresponding declaration file
Aandykais11/23/2022
sure! Sorry for asking questions right before thanksgiving ๐Ÿ˜…. Ill make an issue
Aandykais11/23/2022
GitHub
npm specifiers types not working ยท Issue #16782 ยท denoland/deno
I have two packages here that appear to be packaged with typescript types, but may provide them in unexpected ways. import * as scriptserver from 'npm:@scriptserver/core' import * a...
Ddsherret11/23/2022
no, it's ok. I'm in Canada so we already celebrated last month ๐Ÿ™‚ also, thanks for creating the issue!

Looking for more? Join the community!

Recommended Posts
error Unsupported scheme node for module `nodemodule`. Supported schemesI'm trying to import a module using: ```js import { example } from "npm:example"; ``` Inside `examplesbuild_deno_loader importing Deno modulesA dependancy I use imports modules like "fs" and I want esbuild_deno_loader to treat them as externaIs there a good dataframe library for deno?I use the nodejs bindings for pola.rs for now but I'd like to move from nodejs to deno. This is my ltype a whole directory to make sure each file in the directory exports a default module of a type.Can you type a whole directory to make sure that every file in the directory is exporting a default help mehow do i get the contents of the html, i tried this, but its not loggingextract generic type of generic classhow to get typeof generic type in generic class ```ts class GenericClass<T> {} ``` i want to extractGithub Repository File Tree Generator based on Deno?Is there some project file tree generator written in TS / Deno?How to import the Image class to Deno Fresh?I'm trying to access an image's `naturalHeight` and `naturalWidth`. But when I construct the objectsub sub domain on deno.devIs it possible to create a sub sub domain with deno.dev, example, invite.my-bot.deno.dev, support.myhow to cli run node modules without --compatSo `deno run --compat` has now been removed in favor of `npm:` specifiers https://deno.com/blog/v1.2Intellisense on an import not working, works for friendI cannot for the life of me get `import * as bsdeno from "https://raw.githubusercontent.com/KivalEvaHow to create a broadcast system with streams and oak?i'm trying to create a simple "web-radio" to learn more about streams with deno and oak. i'm stuck oDeno.serveTls with self signed certificatei try to create a webserver but i cannot use self signed certificates, how can i solve this ? ```jReadableStream to JSONi cant seem to get a JSON out of the request.body i attached pictures for the front end JS request cdistinguis `netERR_CONNECTION_TIMED_OUT` from `netERR_CERT_AUTHORITY_INVALID`i get `net::ERR_CERT_AUTHORITY_INVALID` because i use self signed certs on the domain `localhost` nCommand doesn't work in deno task but works outside of deno taskThe command in question: ```(find . -name '*.js'; find . -name '*.as') | grep -v bundle | xargs wc -How do I patch a std api?Hello. This person posted in this command that they "patched" the `vm.isContext` function to returnMonkey patch Broadcast Channel to send messages to current contextEssentially what I want to do is be able to connect to `new BroadcastChannel("test_channel");` whichDynamically imported module evaluation is still pendingI'm very confused on the error i put as the title because in my program i'm trying to just import soHow to setup CORS with serve? I get 403 forbidden.I've setup the following headers (OPTIONS response): ``` new Response(null, { status: 204, heade