Open Mancunia opened 2 years ago
@Mancunia Our plugin isn't yet typescript supported. This was on our backlog and currently migrating our widget to typescript. This will be next, ETA would be around last quarter. You can temporary declare types in your project by defining this library or add into ts-ignore to avoid having error for missing type declarations.
To solve it, add the file to your project and it will work
File: tawk-to-tawk-messenger-react.d.ts
Content:
declare module '@tawk.to/tawk-messenger-react' {
const TawkMessengerReact: any
export default TawkMessengerReact
}
An improved type definition
import * as React from "react";
declare module "@tawk.to/tawk-messenger-react" {
type Props = {
propertyId: string;
widgetId: string;
};
export default class TawkMessengerReact extends React.Component<Props> {}
}
And you can also add any additional props you are interested in.
I want to integrate it into my next js with typescript app, and typescript is giving me tough time