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

Fix return types #271

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

Conversation

tiennou
Copy link
Contributor

@tiennou tiennou commented Feb 2, 2025

Brief Description

Related to #270, but actually state everything's return value explicitly.

Checklists

  • Test passed
  • Coding style (indentation, etc)
  • Edits have been made to src/ files not index.d.ts
  • Run npm run compile to update index.d.ts

@tiennou tiennou marked this pull request as draft February 2, 2025 13:24
@tiennou tiennou force-pushed the fix/strict-return-types branch from 1a16ef5 to 072b560 Compare February 2, 2025 13:30
@tiennou
Copy link
Contributor Author

tiennou commented Feb 2, 2025

Fixed the missing ERR_NOT_OWNER on RoomPosition.createConstructionSite().

@tiennou tiennou marked this pull request as ready for review February 2, 2025 13:31
@tiennou tiennou force-pushed the fix/strict-return-types branch from 072b560 to 7748900 Compare February 2, 2025 13:46
@tiennou
Copy link
Contributor Author

tiennou commented Feb 2, 2025

I had to touch the test file (because of .lookAt() returning ERR_INVALID_ARGS when passed out of bounds coordinates), but npm run test didn't catch it (I found it because TS in my OM workspace saw it).

Maybe something to consider; the testsuite doesn't validate that TS is happy with the screeps-test.ts file

@tiennou tiennou force-pushed the fix/strict-return-types branch from 7748900 to e628c65 Compare February 2, 2025 17:25
@tiennou
Copy link
Contributor Author

tiennou commented Feb 2, 2025

Updated with the bits of #270 that were incorrectly there (the Creep and PowerCreep method returns)

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.

1 participant