daostack / daostack/arc.js

more typing of test code

Open
#353 0 comments 0 reactions 0 assignees View on GitHub
Low Priority
Dominant language
TypeScript
Stars
14
Forks
13
PR merge metrics
No merged PRs in 30d

Description

The lack of function return value typing and use of 'any' makes it harder to figure out what you're doing in places like the test code. Take this code, for example:

```
const receipt2 = await competition.createSuggestion(suggestion2Options).send()
const suggestion2 = receipt2.result
```

No idea what are the types of `receipt2` and `suggestion2`. intellisense won't tell you and there are no comments in the code to make up for it.

So I see the test code but still have no easy way to understand what is going on without digging deeper into the code. (I'm not asking you to tell me, rather just to hear my feedback on the coding practice.)

Contributor guide

Open the contributing guide

Research direction

Start by locating the test code containing competition.createSuggestion(suggestion2Options).send(), then inspect the inferred types and uses of receipt2 and suggestion2. The issue names no file or test and does not define what should change or what completion looks like, so scope and validation would need to be agreed before editing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.