jfbnJ
Denoβ€’10mo ago
jfbn

Types on transitive dependencies

I'm developing a simple slack application.

I'm importing a module like so:
import { App, ExpressReceiver } from 'npm:@slack/bolt'


Several properties of App are not correctly typed, and when stepping into the imported file (which is in the Caches/deno/npm directory) I do indeed see internal imports that do not have corresponding type declarations.

The package does actually have type declarations; I'm just assuming that since the dependency is internally trying to depend on another module like so:

import { WebClient, type WebClientOptions } from '@slack/web-api';

(notice the missing npm: prefix)

it won't resolve it correctly..? Am I misunderstanding something? How can I have properly typed imports?
Was this page helpful?