Stone.js API
    Preparing search index...
    • Decorator to mark a class method as a route action. Automatically registers the method with route definitions using metadata.

      Type Parameters

      • T extends Function = Function

      Parameters

      • path: string | string[]
      • Optionaloptions: MatchOptions

        Partial configuration for the route definition.

      Returns MethodDecorator

      A method decorator.

      import { Match } from '@stone-js/router';

      class UserController {
      @Match({ path: '/users', method: 'GET', name: 'getUsers' })
      getUsers() {
      return 'List of users';
      }
      }