import cloud from '@lafjs/cloud'
export default async function (ctx: FunctionContext) {
console.log(Test.decorated); // 应该能打印 true
}
function testDec(target) {
target.decorated = true;
}
@testDec
export class Test {
}
这个跟普通装饰器的写法一样,不过暂时还没有研究出跨云函数的办法,这肯定还有更多的扩展空间.