class 装饰器可以同时接收构造函数和附加参数吗?

Can a class decorator receive both the constructor function and additional arguments?

我一直在玩 Babel 和装饰器。例如:

function test(target) { 
}

@test
class A {}

我担心的是,是否有某种方法可以针对 class 使用装饰器,并且还能够为所谓的装饰器提供参数,并且不会失去首先获得构造函数的机会参数:

function test(target, arg1, argN) {
   // target will be "hello", arg1 will be "world" and argN undefined,
   // while I would expect target to be the constructor function
}

@test("hello", "world")
class A {}

它是这样工作的

function test(target, arg1, argN) {
  return function(clazz) {
     console.log(target, arg1, clazz)
  } 
}

@test("hello", "world")
class A {}