Issue with Status Typing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 490
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Hello there,
I'm having an issue with the typing of the playStatus; it's possible something is wrong on my end, but I followed other examples almost exactly and haven't seen any other mention of this. I am on Windows using VSCode and downloaded the package through npm.
I'm trying to make a function component in typescript that uses the Sound component. When I try to set status (Sound.status.STOPPED), my compiler is complaining:
Property 'status' does not exist on type 'ComponentClass<ReactSoundProps, any>'.
I'm very confused as Googling has not shown me anyone else having this issue. I briefly attempted using PlayStatus.Stopped instead (as the ctrl+click decompiled index file showed this), but instead of the type error I got a WebPack error.
I'm not sure on whose end this issue is, maybe the component doesn't work with function components?
I've attached my component's file in question.
Thank you
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.
Research direction
Start with the attached Note.tsx.txt and the package index file reached through VSCode's ctrl-click, then reproduce the TypeScript error for Sound.status.STOPPED and the Webpack error for PlayStatus.Stopped. Trace how the Sound component and its status types are exported; done means the reported function-component usage has correct typing and builds without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100