Skip to content

[RFC] Messaging RequestBody and ResponseBody type export #334

@louisgv

Description

@louisgv

How do you envision this feature/change to look/work like?

Follow up on #310

In a messaging handler, dev export a type like this:

export type RequestBody = {
   a: string
   b: number
}

-> Automatic type inference/linking for the messaging API via the metadata interface ?!

What is the purpose of this change/feature? Why?

Type-safety from the handler export seems like a fun way to provide total type-interface abstraction.

(OPTIONAL) Example implementations

No response

(OPTIONAL) Contact Details

No response

Verify canary release

  • I verified that the issue exists in plasmo canary release

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions