Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible fix for npm build type error #153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kestasjk
Copy link

TS2571: Object is of type 'unknown' sure to current(state) returning an unknown type, at least in my VS Code environment which does have the npm etc versions specified. Have little Typescript experience so interested in information on why I might need this to run.

The error I get without this is on this line, where unit is type unknown.
if (unit.countryID === user?.member.countryID.toString()) {

TS2571: Object is of type 'unknown' sure to current(state) returning an unknown type, at least in my VS Code environment which does have the npm etc versions specified. Have little Typescript experience so interested in information on why I might need this to run.

The error I get without this is on this line, where unit is type unknown.
if (unit.countryID === user?.member.countryID.toString()) {
@kestasjk
Copy link
Author

It may well be that the proper fix for this is that I need to add whatever library(?) current comes from to tsconfig.json / package.json / my VS Config.

adamlerer pushed a commit that referenced this pull request Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants