typed-screeps
typed-screeps copied to clipboard
Dtslint assert types
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
describeExits return type is evaluated as
Partial<Record<ExitKey, string>>
even though it is specified as describeExits(roomName: string): ExitsInformation;
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 notindex.d.ts
- [x] Run
npm run dtslint
to updateindex.d.ts