Allow adding `|` as prefix for union
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.2k
- Forks
- 256
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 37
Description
on TypeScript, this will not be error:
type voicevox_result_code =
| "voicevox_result_succeed"
| "voicevox_result_not_loaded_openjtalk_dict"
| "voicevox_result_failed_load_model"
| "voicevox_result_failed_get_supported_devices"
| "voicevox_result_cant_gpu_support"
| "voicevox_result_failed_load_metas"
| "voicevox_result_uninitialized_status"
| "voicevox_result_invalid_speaker_id"
| "voicevox_result_invalid_model_index"
| "voicevox_result_inference_failed"
| "voicevox_result_failed_extract_full_context_label"
| "voicevox_result_invalid_utf8_input"
| "voicevox_result_failed_parse_kana"
but on rbs, it raises error:
type voicevox_result_code =
| :voicevox_result_succeed
| :voicevox_result_not_loaded_openjtalk_dict
| :voicevox_result_failed_load_model
| :voicevox_result_failed_get_supported_devices
| :voicevox_result_cant_gpu_support
| :voicevox_result_failed_load_metas
| :voicevox_result_uninitialized_status
| :voicevox_result_invalid_speaker_id
| :voicevox_result_invalid_model_index
| :voicevox_result_inference_failed
| :voicevox_result_failed_extract_full_context_label
| :voicevox_result_invalid_utf8_input
| :voicevox_result_failed_parse_kana
It would be good if this is allowed.
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. Start by locating the RBS parser and existing union-type syntax coverage, then compare the accepted forms with the TypeScript-style examples shown here. Done means the |-prefixed symbol union is accepted without an error and regression coverage verifies it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100