reflect-metadata icon indicating copy to clipboard operation
reflect-metadata copied to clipboard

Since language specification published, this repo should be archived

Open Edward-Roshan opened this issue 4 years ago • 2 comments

The ECMA language specification has been released: https://262.ecma-international.org/6.0/#sec-reflect.get

In order to avoid confusing, you can archive this repo. The final specification not fully use syntax with this repo mentioned.

I just express my suggestion. Thank you for your contribution. Hope everything will go well.

Edward-Roshan avatar Sep 28 '21 07:09 Edward-Roshan

Reflect.get is not the same as “get metadata”.

ljharb avatar Sep 28 '21 15:09 ljharb

as you can see here: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Reflect/set

the actual specification of Reflect API doesn't support to set property with decoration over class or method. This is wrong. I misunderstand it.

// apply metadata via a decorator to a constructor
@Reflect.metadata(metadataKey, metadataValue)
class C {
  // apply metadata via a decorator to a method (property)
  @Reflect.metadata(metadataKey, metadataValue)
  method() {
  }
}

Edward-Roshan avatar Sep 29 '21 09:09 Edward-Roshan

That proposal doesn’t contain a Reflect.getMetadata function.

ljharb avatar Jun 09 '23 15:06 ljharb

While yes, the decorator metadata proposal is now officially at Stage 3, I don't plan to archive this project as there are many consumers who cannot migrate to native decorators yet due to the lack of support for parameter decorators. I plan to continue to support this package at least until such time as all of the supported use cases are fully covered natively, even if I no longer intend to propose this to TC39.

rbuckton avatar Dec 08 '23 00:12 rbuckton