tc39/proposal-decorators

Decorating standard functions

silkentrance opened this issue · 2 comments

Say, I have an API based on functions and I want to deprecate some of these function, how would I be able to

@deprecate("v0.1.0", "v0.2.0")
function APIEntryPoint1() {
}

export APIEntryPoint1;

What does "deprecate" mean here? There's no runtime concept of deprecation.

Decorating functions is covered in the extensions document:
https://github.com/tc39/proposal-decorators/blob/master/EXTENSIONS.md#function-decorators-and-annotations

It will not be part of the initial release of decorators but may be included as part of a follow-on proposal.