1.0.0-pre.23 • Published 4 years ago
@esfx/metadata-shim v1.0.0-pre.23
@esfx/metadata-shim
The @esfx/metadata-shim
package is a global shim that adds minimal @esfx/metadata
functionality to the Reflect
global object.
This provides partial compatibility with TypeScript's --emitDecoratorMetadata
flag.
Overview
Installation
npm i @esfx/metadata-shim
Usage
import "@esfx/metadata-shim";
import { getMemberMetadata } from "@esfx/metadata";
// TypeScript compiled with --emitDecoratorMetadata
class MyClass {
@someDecorator
method(x: number): string {
return "";
}
}
const c = new MyClass();
getMemberMetadata(c, "method", "design:returntype"); // String
getMemberMetadata(c, "method", "design:paramtypes"); // [Number]
API
You can read more about the API here.
1.0.0-pre.23
4 years ago
1.0.0-pre.19
4 years ago
1.0.0-pre.17
4 years ago
1.0.0-pre.16
5 years ago
1.0.0-pre.11
6 years ago
1.0.0-pre.9
6 years ago
1.0.0-pre.8
6 years ago
1.0.0-pre.6
6 years ago
1.0.0-pre.5
6 years ago
1.0.0-pre.4
6 years ago
1.0.0-pre.3
6 years ago
1.0.0-pre.2
6 years ago
1.0.0-pre.1
6 years ago
1.0.0-pre.0
6 years ago