@types/xxxx package and had problems.Hi, I am trying to use the CodeMirror typings in a JupyterLab extension, however, I cannot compile my extension, because of the typings not having default export, according to tsc:
node_modules/@jupyterlab/codemirror/lib/editor.d.ts:1:8 - error TS1192: Module '"/home/user/development/jupyterlab-extensions/jupyterlab-cell-scanner/node_modules/@types/codemirror/index"' has no default export.
1 import CodeMirror from 'codemirror';
~~~~~~~~~~
This did not happen before, so I think it might be because of a change in the typings.
Have you tried import * as CodeMirror from 'codemirror';
In the end I added a tsconfig.json compiler option to allow synthetic default imports:
allowSyntheticDefaultImports: true.
Most helpful comment
In the end I added a
tsconfig.jsoncompiler option to allow synthetic default imports:allowSyntheticDefaultImports: true.