Magek Framework
    Preparing search index...

    Function returns

    • @returns() decorator for explicit return type declaration on methods.

      Uses TC39 Stage 3 decorators to capture return type metadata that is used for GraphQL schema generation. The type specified should be the GraphQL return type (not wrapped in Promise).

      Usage: @returns(type => UUID) public static async handle(...): Promise { ... }

      @returns(type => String) public static async handle(...): Promise { ... }

      @returns(type => [CartItem]) public static async handle(...): Promise<CartItem[]> { ... }

      Parameters

      Returns MethodDecorator