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

Dtslint assert types

Open IotaBlack opened this issue 3 years ago • 0 comments

Brief Description

Added dtslint $ExpectType to most places in tests, this makes it easier/possible to split tests across multiple files and to accurately test is a type is what it is supposed to be. Another benefit is that we can remove a lot of unnecessary "hacky" code from the tests that were previously used to make typescript complain

There are some issues that need to be dealt with before this can be merged

image describeExits return type is evaluated as Partial<Record<ExitKey, string>> even though it is specified as describeExits(roomName: string): ExitsInformation;

image dtslint is order sensitive and this one likes to shuffle around

Checklists

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

IotaBlack avatar Aug 18 '21 16:08 IotaBlack