uiwjs / react-monacoeditor

Monaco Editor component for React.
https://uiwjs.github.io/react-monacoeditor/
MIT License
296 stars 25 forks source link

Add typescript types #15

Closed Arthur-Kamau closed 4 years ago

Arthur-Kamau commented 4 years ago

This plugin is awesome .Thanks. Small problem though trying to use it within typescript causes an error as it does not have typescript types. Thanks.

jaywcjlove commented 4 years ago

@Arthur-Kamau Upgrade @uiw/react-monacoeditor@2.2.0

worrel commented 4 years ago

Hi @jaywcjlove this is useful but the typings/index.d.ts folder does not appear to be included in the package when installed in node_modules so Typescript still doesn't find them:

Screen Shot 2020-09-04 at 10 00 53 AM

I got it working by manually copying the type definitions into a folder that I've specified in tsconfig.json typeRoots

jaywcjlove commented 4 years ago

@worrel thx! Upgrade + @uiw/react-monacoeditor@2.2.2