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

Strict return types #265

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tiennou
Copy link
Contributor

@tiennou tiennou commented Jan 25, 2025

Brief Description

This should go after #266 (yep, I mixed up by pushing it later, my bad).

The plan is to remove the crutch of ScreepsReturnCode, CreepActionReturnCode and CreepMoveReturnCode because there's a few places where they're too "wide". So I reviewed all of the docs (and even did some runtime spelunking in cases that were ambiguous). At the end of this, only CreepMoveReturnCode remains in use for Creep (though it could be dropped entirely from the signatures if that's a direction people like), as it can't be used for PowerCreep because of ERR_TIRED.

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 changed the title Fix/strict return types Strict return types Jan 25, 2025
@tiennou
Copy link
Contributor Author

tiennou commented Jan 25, 2025

That caught a few missing things as well. I guess those could be extracted if the whole idea feels like an issue.

@tiennou tiennou mentioned this pull request Jan 25, 2025
4 tasks
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