`setupTwoslashHovers` is unavailable from `shiki-twoslash/dist/dom`, but hover is unavailable without it.
See original GitHub issueEnvironment
Node 16.0.0 Yarn gatsby-remark-shiki-twoslash: 3.0.7 shiki-twoslash: 1.6.2 Windows 10
Bug
I just did a fairly big version jump of gatsby-remark-shiki-twoslash
from 0.7.0 to 3.0.7, and I’ve started getting errors on the line:
import { setupTwoslashHovers } from "shiki-twoslash/dist/dom";
This import mentioned anywhere in the docs, but it was in the TypeScript website code a while back. Strangely, the code is still in shiki-twoslash
source in this project, and dom.d.ts
is available in node_modules
, but there are no references to setupTwoslashHovers
anywhere else, and no dom.js
file alongside dom.d.ts
to import. If I take out the import, it fixes the errors, I lose all tooltips in code examples.
Has this changed in v2 or v3? There doesn’t seem to be a changelog, so I’m not really sure what I’m doing wrong here.
Reproduction
Project link: https://github.com/threehams/typescript-quirks
I am very new to Gatsby and would have trouble cutting this example down.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
Still, I could have struggled with this for two days and still saved time over what I was doing before!
Hah, yep, if it’s still in there