You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Create a new npm package: npm init
Add typescript as a dependency: npm add typescript
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.
The text was updated successfully, but these errors were encountered:
seanstern
added a commit
to seanstern/poker-engine
that referenced
this issue
Mar 20, 2022
Sumamry
This package relies on
tsc
as part of it'sbuild
command in package.json.When this package is added to another project that has a dependency on
"typescript": "^4.4.2"
, thebuild
step fails with:Reproduction Steps
npm init
npm add typescript
@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:Additional Notes
I'm going to submit a PR coming your way. Hope this was helpful.
The text was updated successfully, but these errors were encountered: