microsoft / microsoft/reflect-metadata
What is Metadata?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.4k
- Forks
- 190
- Avg merge
- 13h 52m
- Merged PRs (30d)
- 1
Description
Can I ask what is metadata exactly? I haven't found anywhere any good description, only methods JsDoc.
According to Metadata Proposal you offer to add to any JS Object unreachable property [[Metadata]]. But anyone could read and write to it with specialized methods? Like 'defineMetadata', 'getOwnMetadata'? So it is more like getter/setter from OOP without direct access to property.
So I can make something like this to copy the behavior?
//structure will look like:
const obj = {};
obj['Metadata'] = {
customProperty1: {
property: 'someValue'
}
}
// Methods would look like this:
Object.prototype.defineMetadata = function(metadataKey, metadataValue, target, key) {
this['metadata'][metadataKey] = {key: metadataValue};
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the Metadata Proposal and methods such as defineMetadata and getOwnMetadata. Start by comparing the proposal with the methods' JsDoc and the example in the issue. Done means documenting what metadata is, how it is accessed, and whether the proposed object-property model is accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100