Somewhat unfortunate example on void return type on a fetching function
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- documentation
Research direction
Start in packages/documentation/copy/en/declaration-files/Do's and Don'ts.md at the linked example around line 81. Read the surrounding guidance on non-optional callback parameters and assess whether the Fetcher example clearly distinguishes that point from the question of a void return type. Done means the example or wording better communicates the intended guidance.
Written by the indexing model from the issue text.
Description
https://github.com/microsoft/TypeScript-Website/blame/0612591abc2d8292c8ddd084b5fb264f203b7026/packages/documentation/copy/en/declaration-files/Do's and Don'ts.md#L81
Sorry if this is overthinking - i am new to typescript.
You are giving a DO example with an interface called "Fetcher" that defines getObject but returning nothing aka void. I think I got the point of "Do write callback parameters as non-optional", but the context is somewhat unfortunate. Maybe there can be thought of a better example for non-optional callback parameters?
Another way to phrase my thought: Is it a DO to use return type void on a getter-Method?
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 1.5k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 5
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.
More from microsoft/TypeScript-Website
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
microsoft/TypeScript-Website#3611 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/TypeScript-Website#3607 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
microsoft/TypeScript-Website#3039 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/TypeScript-Website#2998 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
microsoft/TypeScript-Website#3650 ·
All issues in microsoft/TypeScript-Website
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·