Skip to content

Enable Compact Mode

Choose a tag to compare

@calidion calidion released this 30 Sep 12:43
· 41 commits to master since this release

With compact mode, aex can use one variable to hold traditional req, res, scope array.
for example:
traditional:
we can use this to have tree variables.

class A {
@http("*", "*")
async function (req, res, scope) {
}
}

if you don't want be bothered with tree variables, use can use compact mode to have only one variable

class A {

@http("*", "*", true)
async function (context) {
 const {req, res, scope} = context
}
@compact("*", "*")
async function (context) {
 const {req, res, scope} = context
}
}