[LiquidDoc] Add union types
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
Add the possibility to add union types for LiquidDocs.
E.g.
@param {string|number} my_variable - This can be a string or a number.
Use cases:
-
When passing an image aspect attribute, you can manually enter the numeric value as
0.5or you can enter a string as1/2, and then have the snippet to the math for you. -
To be a bit more lax. When passing a width attribute and appending
%. E.g.{{ width | append: '%' }}, you wouldn't care if it's a number or a string.
@karreiro (Tagging for visibility)
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
No files or tests are named in the issue. Begin by locating the LiquidDoc type-parsing entry point and existing parameter-type coverage, then trace how the documented {string|number} form is interpreted. Done means union annotations are accepted for the stated use cases and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100