microsoft/reflect-metadata

Prototype for a Metadata Reflection API for ECMAScript

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 51 minutes ago
Added to GitGenius on September 20th, 2026
Created on March 11th, 2015
Open Issues & Pull Requests: 29 (+0)
GitHub issues: Enabled
Number of forks: 190
Total Stargazers: 3,359 (+0)
Total Subscribers: 42 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 5
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,107 days
Stale 30+ days: 5
Stale 90+ days: 5

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Reflect-metadata is a polyfill and prototype implementation of a Metadata Reflection API for ECMAScript that enables decorators to attach and retrieve metadata on classes and their members.

The tool solves the problem of adding and accessing metadata on classes in a consistent, language-level way. It provides a reflective API that allows decorators and other code to define metadata declaratively through decorator syntax or imperatively through Reflect methods, and then introspect that metadata at runtime. The implementation stores metadata in internal properties on objects and their prototypes, organized by property keys, and exposes operations through the Reflect object to read, write, and check for metadata existence.

Developers using TypeScript's legacy experimentalDecorators option should adopt this package to enable metadata-driven patterns like dependency injection, runtime type assertions, and reflection-based testing. The tool is particularly suited for frameworks and libraries that need a standardized way to reason over metadata attached by multiple decorators. While the proposal itself is no longer being considered for standardization now that TC39 has advanced the Decorators and Decorator Metadata proposals to Stage 3, this package continues to support projects that cannot yet migrate away from TypeScript's experimental decorator implementation.

The project maintains active support for existing users despite the shift in standardization direction, indicating a commitment to backward compatibility for projects relying on the experimental decorators feature. Development activity focuses on sustaining the implementation for legacy codebases rather than expanding the API surface.