shikijs / shiki

A beautiful yet powerful syntax highlighter
http://shiki.style/
MIT License
9.91k stars 361 forks source link

fix(rehype): fix type issues #699

Closed remcohaszing closed 3 months ago

remcohaszing commented 3 months ago

Description

The augmented hast Data interface conflicts with ElementData from mdast-util-to-hast. The augmentation is redundant, so it’s removed entirely.

The augmented hast Properties interface was redundant and invalid. Instead, the value is now converted to string in the place it is used.

Linked Issues

https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69775

Additional context

You should only augment interfaces if you define something, not if you consume it.

netlify[bot] commented 3 months ago

Deploy Preview for shiki-matsu ready!

Name Link
Latest commit d5888e656b59b042ddca31e6e4fbcf35d4da5f18
Latest deploy log https://app.netlify.com/sites/shiki-matsu/deploys/666ad33f92bcff0008e68962
Deploy Preview https://deploy-preview-699--shiki-matsu.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 3 months ago

Deploy Preview for shiki-next ready!

Name Link
Latest commit d5888e656b59b042ddca31e6e4fbcf35d4da5f18
Latest deploy log https://app.netlify.com/sites/shiki-next/deploys/666ad33f389a88000894b391
Deploy Preview https://deploy-preview-699--shiki-next.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.