PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.59k stars 369 forks source link

[BUG] PlasmoMessaging Request type is never #1047

Closed Dun-sin closed 2 months ago

Dun-sin commented 3 months ago

What happened?

Typescript throws an error for this code whenever you use the sendToBackground function from @plasmohq/messaging.

It shows this: PlasmoMessaging.Request<never, {}>

Not sure where the fix of this bug should come in, but would be happy to raise a PR

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

No response

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

rahulraikwar00 commented 2 months ago

Try to restart the typescript server and also restart the dev

Dun-sin commented 2 months ago

Try to restart the typescript server and also restart the dev

thanks will try that

sleekslush commented 2 months ago

Yea, this happens when you haven't re-built the extension, bc it generates new types.

Dun-sin commented 2 months ago

Yea, this happens when you haven't re-built the extension, bc it generates new types.

@rahulraikwar00 tip helped. Thanks