Skip to content
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

Types not resolving in Deno #187

Closed
4 tasks done
m-dressler opened this issue Nov 29, 2024 · 4 comments
Closed
4 tasks done

Types not resolving in Deno #187

m-dressler opened this issue Nov 29, 2024 · 4 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@m-dressler
Copy link

m-dressler commented Nov 29, 2024

Initial checklist

Affected package

npm:rehype@13.0.2

Steps to reproduce

When adding rehype via deno add npm:rehype and then writing

import { rehype } from "rehype";

const processor = await rehype();

Now processor has type any. Resolving further, if inspecting the source for rehype() and inspecting the types for

import type {Root} from 'hast'
import type {Processor} from 'unified'

The import types show "Resolved Dependency. Types: [errored]" (VS Code w/ Deno Extension)

Actual behavior

The Processor<...> type isn't resolved and defaults to any.

Expected behavior

The Processor<...> type should be resolved.

Other attempts

Also tried installing deno add npm:unified & deno add npm:hast to see if types resolve to no avail.

Runtime

Deno v2.0.6

Package manager

"

Operating system

macOS 15.0.1 (24A348)

Build and bundle tools

No response

P.S. rehype on JSR would be amazing!

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 29, 2024
@wooorm
Copy link
Member

wooorm commented Nov 30, 2024

Hi!

The import types show "Resolved Dependency. Types: [errored]" (VS Code w/ Deno Extension)

Did you raise it there? Why do you think the solution would be here?


P.S. rehype on JSR would be amazing!

I dunno. Sounds like Deno is changing their recommendations several times now

@m-dressler
Copy link
Author

@wooorm Sorry for the late reply - you were right, it was an issue with VS Code. Sorry about the false positive. RR: JSR, I see that point. Personally using it in all my project moving forward, but simply my personal preference. Would love to see it published there, too, though. But if this is something that could be planned, I guess it'd make more sense to move it to a separate ticket.

This comment has been minimized.

@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Jan 2, 2025
Copy link

github-actions bot commented Jan 2, 2025

Hi team! Could you describe why this has been marked as external?

Thanks,
— bb

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants