Add doc for getPropertyDescriptor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 142
- Forks
- 230
- PR merge metrics
- No merged PRs in 30d
Description
Currently we cover custom property accessors, but not overriding `getPropertyDescriptor`, which lets you customize the way accessors are generated for all properties, among other things. This is something you'd be likely to do when creating a new base class that extends either ReactiveElement or LitElement.
This is kind of an advanced use case. Need to figure out whether it goes in the properties section, or whether there's a set of advanced topics related to creating your own base class.
"There's some examples in the tests. The idea is you can use it in combination with customizing property options to add features via creating a base class...
https://github.com/Polymer/lit-html/blob/lit-next/packages/reactive-element/src/test/reactive-element_test.ts#L1766-L1967
Contributor guide
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 with the examples in packages/reactive-element/src/test/reactive-element_test.ts, especially lines 1766-1967, to understand getPropertyDescriptor and its use with customized property options. Then determine whether the explanation belongs in the properties section or in advanced guidance for creating a base class. Done means documenting this use case and its relationship to ReactiveElement and LitElement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100