typed-screeps icon indicating copy to clipboard operation
typed-screeps copied to clipboard

`OBSTACLE_OBJECT_TYPES` causes `includes` argument to be too narrow, defeating the purpose of it existing.

Open dyc3 opened this issue 3 years ago • 0 comments

Expected Behavior

The following should work fine

OBSTACLE_OBJECT_TYPES.includes("test")

Actual Behavior

It makes ts angry >:(

Sample code (if available)

workaround

(OBSTACLE_OBJECT_TYPES as string[]).includes("test")

Your Environment

  • Node.js version: v14.18.2
  • TypeScript version: 4.3.5
  • @types/screeps version: ^3.2.3

dyc3 avatar May 08 '22 20:05 dyc3