@aster-rpc/aster API Reference
    Preparing search index...

    Function WireType

    Register a class for cross-language Fory serialization.

    • Register a class as a Fory XLANG wire type.

      Parameters

      Returns <T extends new (...args: any[]) => any>(
          target: T,
          _context: ClassDecoratorContext,
      ) => T

      @WireType("billing/Invoice")
      class Invoice {
      amount = 0;
      currency = "USD";
      }

      @WireType("billing/Invoice", {
      metadata: { amount: new Metadata({ description: "Total in cents" }) }
      })
      class InvoiceWithDocs {
      amount = 0;
      currency = "USD";
      }