uiwjs / react-monacoeditor

Monaco Editor component for React.

Home Page:https://uiwjs.github.io/react-monacoeditor/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add typescript types

Arthur-Kamau opened this issue · comments

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.

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

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

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