microsoft / microsoft/reflect-metadata
Decorated class inheritance issue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.4k
- Forks
- 190
- Avg merge
- 13h 52m
- Merged PRs (30d)
- 1
Description
When multiple instances extends from the same base class that has decorated properties. Children decorators 'pollutes' parent metadata. They were also attached to parent prototype.
Example:
following decorators use reflect-metadata to 'define' and 'get' metadata.
class Base {
@SomeDecorator
prop
}
class A extends Base {
@SomeDecorator
propA
}
class B extends Base {
@SomeDecorator
propB
}
This will result class B has three metadata, prop, propA and propB
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
Start by reproducing the Base, A, and B decorated-class example described in the issue with reflect-metadata. Trace how metadata is defined and retrieved across the inheritance chain, then verify that B does not acquire A's propA metadata and that parent metadata remains unchanged. The issue is open but has had no comment for 452 days.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100