tc39/proposal-decorators

several calls to context.addInitializer()

Closed this issue · 2 comments

I am reading in detail the spec and I am not sure about the correct behavior when a decorator calls context.addInitializer() several times. I understand that each call to context.addInitializer() adds a new initializer into the [[FinisherInitializers]]. is it true?

That is the correct behavior, multiple initializers can be added per decorated item

Thanks @pzuraq.

In this way, the section 15.7.7 CreateDecoratorContextObject ( kind, name, metadataList, initializers [ , isStatic ] ) I don't found the addInitializer. Is it correct?