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

getDirectionTo can return undefined but typings only have DirectionConstant as a return value. #254

Open
Sca1ey opened this issue Jan 11, 2024 · 0 comments
Labels
bug good first issue Good for newcomers

Comments

@Sca1ey
Copy link

Sca1ey commented Jan 11, 2024

Expected Behavior

The return type of getDirection to should be DirectionConstant | undefined

Actual Behavior

The return type on getDirection to is DirectionConstant

Sample code (if available)

const roomPos = new RoomPosition(25, 25, 'E7N51')
console.log(roomPos.getDirectionTo(roomPos)) //undefined

Your Environment

  • Node.js version: 21.5.0
  • TypeScript version: 4.3.5
  • @types/screeps version: jomik/typed-screeps#flexible-memory
@Sca1ey Sca1ey added the bug label Jan 11, 2024
@DiamondMofeng DiamondMofeng added the good first issue Good for newcomers label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants