react-mic icon indicating copy to clipboard operation
react-mic copied to clipboard

How to use with typescript project (like NextJs) ?

Open diego3 opened this issue 4 years ago • 1 comments

Hello guys, thanks for this amazing lib.

I'm trying to use react-mic with a NextJs + Typescript project

But seams like react-mic is not ready to work with Typescript, is that right?

import { ReactMic } from 'react-mic'

------ 
import doens't work and in my vscode react-mic part is red with a message saying "Could not find a declaration file for module 'react-mic'. "

I've added react-mic as a dependency with a command:

yarn add react-mic

Everything compiled successfully, but the error is happening at runtime

diego3 avatar Sep 17 '21 16:09 diego3

Right, TypeScript is a Javascript npm package. I'm not going to be supporting TypeScript, but you can fork the library and create a version of it that works with TypeScript :)

hackingbeauty avatar Sep 17 '21 17:09 hackingbeauty