react-chat-elements icon indicating copy to clipboard operation
react-chat-elements copied to clipboard

Typescript type declaration

Open andrewhamili opened this issue 3 years ago • 8 comments

image

Type declaration for React Typescript

andrewhamili avatar Apr 02 '21 01:04 andrewhamili

i need this also

kodunmi avatar Apr 29 '21 12:04 kodunmi

+1

nzayatz14 avatar Apr 30 '21 12:04 nzayatz14

+1

I'm using the typescript branch

I had to modify the code a bit, but it works

kodunmi avatar Apr 30 '21 14:04 kodunmi

@kodunmi what branch is typescript branch?

andrewhamili avatar May 01 '21 02:05 andrewhamili

@andrewhamili sorry its not a branch, its another repo. https://github.com/tonnenpinguin/react-chat-elements/tree/typescript_migration

kodunmi avatar May 01 '21 04:05 kodunmi

@andrewhamili sorry its not a branch, its another repo. https://github.com/tonnenpinguin/react-chat-elements/tree/typescript_migration

It's 84 commits behind Detaysoft:master

Enough7 avatar Jul 14 '21 11:07 Enough7

Type declarations are needed

altarrok avatar Jul 26 '21 01:07 altarrok

you literally just create a CreateReactElements.d.ts file (anywhere, really), and then copy/paste what it tells you: declare module react-chat-elements. That will remove that error.

Other than that, depending on usage, you might have to create your own typescript declarations, but it is mostly just the definitions of types that your compiler is complaining about, so you only do for what you need.

tjsturos-vincit avatar Aug 30 '21 13:08 tjsturos-vincit