workerd icon indicating copy to clipboard operation
workerd copied to clipboard

Fix returning interface types from rpc methods

Open alpertuna opened this issue 10 months ago • 13 comments

Fixes #2003

interface does not extend Serializable but type does.

interface R1 {
  field: string;
}
type R2 = {
  field: string;
}

R1 extends Serializable fails. R2 extends Serializable ok.

After the patch both interface and type match Serializable.

This fix is a starting point for the issue, there may be a better solution.

alpertuna avatar Apr 20 '24 19:04 alpertuna