twoslashes / twoslash

Markup for generating rich type information in your documentations ahead of time.
https://twoslash.netlify.app/
MIT License
430 stars 16 forks source link

fix: import ts from `typescript` instead of `typescript/lib/tsserver` #43

Closed mattpocock closed 1 month ago

mattpocock commented 1 month ago

Changed this to .js instead of 'typescript', as this will work better with versions of TypeScript before 5.3.

netlify[bot] commented 1 month ago

Deploy Preview for twoslash ready!

Name Link
Latest commit d193490c8cfcb5b79126c54d5a743aa8059d625f
Latest deploy log https://app.netlify.com/sites/twoslash/deploys/6665428c82ab2c0008f6001a
Deploy Preview https://deploy-preview-43--twoslash.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.

jakebailey commented 1 month ago

Are any tsserverlibrary specific exports even used? When I looked at the code from the last PR, it sure seemed like they could just use the regular import.

antfu commented 1 month ago

Right, we probably don't need tsserver. It is like that because it was how it was written in TypeScript Website repo. I think we should be good to use typescript even before 5.3

mattpocock commented 1 month ago

Confirmed that this unblocked me 👍

jakebailey commented 1 month ago

I don't really understand how this was needed at the end of the day, given TS is CJS and so this import should be fine, but at least this import wasn't even needed.