Skip to content

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

@Sca1ey

Description

@Sca1ey

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions