Reflect
约 1 分钟阅读
- 反射
- 参考
- Reflect链接developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect反射 · 参考 · https://rbuckton.github.io/reflect-metadata/ · | ext | for | · | Reflect.decorate | · | Reflect.defineMetadata |笔记:Reflect
Reflect.metadata
| ext | for |
|---|---|
| Reflect.decorate | |
| Reflect.defineMetadata | |
| Reflect.getMetadata | |
| Reflect.hasMetadata | |
| Reflect.getOwnMetadata | |
| Reflect.hasOwnMetadata | |
| Reflect.metadata | 返回 decorator |
@Reflect.metadata(metadataKey, metadataValue)
class C {
// apply metadata via a decorator to a method (property)
@Reflect.metadata(metadataKey, metadataValue)
method() {
}
}- 类型信息 Key - emitDecoratorMetadata
- design
- design
- design
- Typescript
- emitDecoratorMetadata
- www.typescriptlang.org/docs/handbook/decorators.html
- core-js/es7/reflectGitHub 文件zloirock/core-js/packages/core-js/es/reflect反射 · 参考 · https://rbuckton.github.io/reflect-metadata/ · | ext | for | · | Reflect.decorate | · | Reflect.defineMetadata |笔记:Reflect
- reflect-metadataGitHubrbuckton/reflect-metadata
- @abraham/reflectionGitHubabraham/reflection
关联信息
反向链接、本文链接的其他页面和外部资料。
反向链接
- JS References笔记 · Reflect
Decorator · Reflect · Prototype · Chrome 67+, Safari 14.1+, Node 10.4+ · 能表示 int64 · ⚠️ 不能和 number 直接运算 · clamp/截断 · BigInt.asIntN
参考资料
GitHub3 条
- abraham/reflectiongithub.com/abraham/reflection
- rbuckton/reflect-metadatagithub.com/rbuckton/reflect-metadata
- zloirock/core-js/packages/core-js/es/reflectgithub.com/zloirock/core-js/tree/master/packages/core-js/es/reflect
其他外链3 条
- developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflectdeveloper.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect
- rbuckton.github.io/reflect-metadatarbuckton.github.io/reflect-metadata
- www.typescriptlang.org/docs/handbook/decorators.htmlwww.typescriptlang.org/docs/handbook/decorators.html