Fix typescript errors related to promises.
Merge pull request #68 from uProxy/dborkan-new-tcp

Fix typescript errors related to promises.