Saxonberg Server API
    Preparing search index...
    • Mark a method on a Shadow class as intercepting a host method. Two forms:

      Parameters

      • hostName: string

      Returns (target: object, propertyKey: string, descriptor: PropertyDescriptor) => void

      addXp(n: number) { ... } // intercepts host.addXp

      @Shadowing('take')
      loggedTake(item: Stuff) { ... }       // intercepts host.take
      

      Stored on the Shadow class as a static _callSecShadowing Map keyed by HOST method name → LOCAL method name. ShadowApi's dispatcher consults the map to find the actual method to invoke.

      Polymorphic on first argument: a string ⇒ "remap to this host method name"; a method-decorator triple ⇒ "use the local name as the host name."

    • Mark a method on a Shadow class as intercepting a host method. Two forms:

      Parameters

      • target: object
      • propertyKey: string
      • descriptor: PropertyDescriptor

      Returns void

      addXp(n: number) { ... } // intercepts host.addXp

      @Shadowing('take')
      loggedTake(item: Stuff) { ... }       // intercepts host.take
      

      Stored on the Shadow class as a static _callSecShadowing Map keyed by HOST method name → LOCAL method name. ShadowApi's dispatcher consults the map to find the actual method to invoke.

      Polymorphic on first argument: a string ⇒ "remap to this host method name"; a method-decorator triple ⇒ "use the local name as the host name."