You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug:
@types/katex definitions use named exports, but katex v0.14+ switched to using a default export.
To Reproduce:
Steps to reproduce the behavior:
Install katex v0.14 or above
Install @types/katex
Try to use it, e.g. import { renderToString } from 'katex'
See runtime error: import is undefined
Expected behavior:
Types are consistent with implementation, i.e. should only allow import katex from 'katex' if KaTeX is only exporting a default value instead of named exports
Environment (please complete the following information):
It seems like we should support import {renderToString} from 'katex' in addition to the default export, even when using ESM. @ylemkimon is this hard to do?
Describe the bug:
@types/katex definitions use named exports, but katex v0.14+ switched to using a default export.
To Reproduce:
Steps to reproduce the behavior:
katex
v0.14 or above@types/katex
import { renderToString } from 'katex'
Expected behavior:
Types are consistent with implementation, i.e. should only allow
import katex from 'katex'
if KaTeX is only exporting a default value instead of named exportsEnvironment (please complete the following information):
Additional context:
I have started a PR here
The text was updated successfully, but these errors were encountered: