Skip to content

Failed to import - @thebeyondgroup/[email protected] #1177

@jaydenseric

Description

@jaydenseric

Failing module

import { convertSchemaToHtml } from "https://esm.sh/@thebeyondgroup/[email protected]?target=deno&dev";

The above import works at runtime, but in VS Code hovering on convertSchemaToHtml the intellisense is just import convertSchemaToHtml and TypeScript is unable to access the types.

In the exact same module, the adjacent React imports from esm.sh have correct intellisense and types, so there is something wrong with how esm.sh is serving the types for this specific kind of package.

Looking into it, could it be because the types appear to be served here:

https://esm.sh/@thebeyondgroup/[email protected]/index.d.ts

And if you look at the contents of the served types, at the top is:

declare module 'https://esm.sh/@thebeyondgroup/[email protected]/index.d.ts' {

Is that correct? Would that not cause a problem if the actual cached module being imported is not served from one of these:

I don't know, just thinking out loud.

Additional info

  • Deno version: 2.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    denoNot working in Deno

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions