RocketChat / RocketChat/Rocket.Chat
need to change method return type to IAppStorageItem | null, because findOneAndUpdate can return null if the document is not found.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
But for now, we are asserting that it will always return a document.
📝 Found in apps/meteor/ee/server/apps/storage/AppRealStorage.ts#L77
Commit: 03546e6e881a383c3fab48155871b023ccea7bb8
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 at apps/meteor/ee/server/apps/storage/AppRealStorage.ts around line 77 and inspect the findOneAndUpdate call and its current return assertion. Update the method's type handling to reflect that no document may be returned, then run the relevant TypeScript checks or tests for the app storage implementation; done means the return type accurately includes null without type errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100