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

Adding package in project with typescript ^4.4.2 fails during build #5

Open
seanstern opened this issue Mar 20, 2022 · 0 comments
Open

Comments

@seanstern
Copy link

seanstern commented Mar 20, 2022

Sumamry

This package relies on tsc as part of it's build command in package.json.

When this package is added to another project that has a dependency on "typescript": "^4.4.2", the build step fails with:

src/Card.ts(72,3): error TS2717: Subsequent property declarations must have the same type.  Property 'color' must be of type 'CardColor', but here has type 'CardColor'.

Reproduction Steps

  1. Create a new npm package: npm init
  2. Add typescript as a dependency: npm add typescript
  3. Add @chevtek/poker-engine as a dependency: npm add @chevtek/poker-engine

Suggested fix

Update Card.ts such that get color () declaration has return type annotation. That is:

get color (): CardColor {

Additional Notes

I'm going to submit a PR coming your way. Hope this was helpful.

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

No branches or pull requests

1 participant