---
source: boltffi_bindgen/src/render/typescript/templates.rs
expression: template.render().unwrap()
---
export interface Point {
  readonly x: number;
  readonly y: number;
}

const PointCodec: WireCodec<Point> = {
  size: (_v) => 16,
  encode: (writer, v) => {
    writer.writeF64(v.x);
    writer.writeF64(v.y);
  },
  decode: (reader) => {
    return {
      x: reader.readF64(),
      y: reader.readF64(),
    };
  },
};
