react-summernote
react-summernote copied to clipboard
Use library in React TSX
When try to use the TSX file as import ReactSummernote from 'react-summernote';
How can i create definition file for Summernote.jsx so that i dont get react-summernote module not found.
and where i need to place that file and code snippet for the d.ts file.
Thanks,
I followed these instructions https://www.detroitlabs.com/blog/2018/02/28/adding-custom-type-definitions-to-a-third-party-library/ I didn't type anything just created a bare bones *.d.ts file
create directory typings_custom at project root
mkdir typings_custom
create type file
touch typings_custom/react-summernote.d.ts
add line to react-summernote.d.ts declare module 'react-summernote'
update tscongif.js to use new custom typing directory
"include": [ "./typings_custom/**/*.ts" ],