import {BaseController, Controller, PATTERN, TPattern} from '../../ServiceModule' import {Exception} from '@lakutata/core' class TestException extends Exception { district: string errno: number | string = 'E_TEST' } @Controller({test: 1}) export class Test1Controller extends BaseController { @PATTERN({opr: 'add'}) public async add(inp: TPattern) { // throw this.generateException(TestException, 'this is test exception') return { sum: inp.a + inp.b, // big: bigArr } } @PATTERN({opr: 'big'}) public async big(inp: TPattern){ return new Array(5165536).fill('abcd123456') } }