Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with typescript #13

Open
Mancunia opened this issue Aug 22, 2022 · 4 comments
Open

Incompatible with typescript #13

Mancunia opened this issue Aug 22, 2022 · 4 comments

Comments

@Mancunia
Copy link

I want to integrate it into my next js with typescript app, and typescript is giving me tough time

@jaoaustero
Copy link
Contributor

@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.

@KesleyDavid
Copy link

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
}

@jsgv
Copy link

jsgv commented Jul 11, 2024

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.

@jonknyc
Copy link

jonknyc commented Dec 4, 2024

@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.

running a little behind schedule?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants