Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add some overloads #14
Overloads some of the functions to remove the need to type the output.
With the current system, you had to type the output of some functions e.g.
room.find<Creep>(FIND_MY_CREEPS) // Has the type Creep
But come along later and change the find to something else
room.find<Creep>(FIND_MY_SPAWNS) // Still has the type Creep
Overloads let us change the output if the input has various types
room.find(FIND_MY_CREEPS) // Creep room.find(FIND_MY_SPAWNS) // StructureSpawn
The old method is still supported and is there for anything that doesn't match the overloads.
There are more methods that could be overloaded so please don't pull this yet.
The last commit adds a
If the lint fails or either typescript compiles fail the tests will fail. @resir014 You can enable TravisCI after this PR is pulled to get automated testing up and running if you think its worth it.
@Arcath Thanks for looking into the docblocks as well! Really appreciate it.…
On Mon, 13 Nov 2017, 19:19 Adam Laycock, ***@***.***> wrote: There's a little issue with jsdoc to fix now then its good to do. the documentation only applies to the first overload, leaving the rest un documented. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#14 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFZshZHttGsS5X2DgeYMBIQ6cs3Onlmrks5s2DPfgaJpZM4QX9z_> .